How regression algorithm works on categorical features I have a dataset with features that most of them are nominal categorical features, I have converted my model to indicator values, 

Original

F1,F2,L
1 ,1 ,50
2 ,3 ,30


After indicator values

F1-1,F1-2,F2-1,F2-3,L
1   ,0   ,1   ,0   ,50
0   ,1   ,0   ,1   ,30


I used different regression algorithm (Poisson, Bayesian, Decision Tree reg, Decision Forest reg, Boosted decision tree reg, linear regression, neural network), but all of then have low performance (r2 ~ 20-30)

Then I was thinking how regression can find values, then I found something interesting : relation of data with label
They are like below picture




But in most of the books and examples and samples suitable data for regression are like below



And this is the point I got confused!

So my question is how regression (or which algorithms) are suitable for predicting values in high categorical data
TL;DR: It is a convention to convert categorical features to numeric features before you can use them in regression, or any other machine learning algorithm for that matter. Technically, there is nothing that is stopping ML algorithms from working with categorical features but their software implementation would be prohibitively expensive, hence this convention in ML practice.

Turning to your problem, if you are trying to convert categorical label values into numerical values, there are various methods but it appears the best one for your data would be One-Hot encoder. Both Scikit-Learn and PySpark, and most other libraries provide handy functions for it, as it is very common operation. For example: 

from sklearn.preprocessing import OneHotEncoder
one_hot = OneHotEncoder()
one_hot.fit(...your_columns...)


Once you have all data in numeric form, you can use pretty much any algorithm. 

As for the last figure, it is scatter plot between x and y, and it is not obvious what x and y are. Weirdly enough, it is not one-on-one relationship because a given value of x seems to produce multiple value of y?!!! And I am not sure what you are plotting in earlier figures that is giving you straight lines!