Dear all
I am trying to overlay on a scatterplot a straight line that passes through the origin with a specific slope. The code that i use is the following:
twoway scatter var1 var2 || function y=20000*x , range(-0.50 0.50)
var1 has a min of -500 and a max of 500
var2 has a min of 0.50 and a max of 0.50
The problem that i have is that the line is always a 45 degrees line and the scatterplot is distorted with the points concentrated. This is because the values of the y axis are -predictably- going through the roof. The x axis that shows var2 looks fine.
I was wondering if there is a way to draw the line without the y axis taking the values of the function. Instead i would like only the slope of the line to change (beyond 45 degrees) and keep the original values of the variable (var1). This would not distort my graph.
Any ideas?
Thank you!!
Cynthia
I am trying to overlay on a scatterplot a straight line that passes through the origin with a specific slope. The code that i use is the following:
twoway scatter var1 var2 || function y=20000*x , range(-0.50 0.50)
var1 has a min of -500 and a max of 500
var2 has a min of 0.50 and a max of 0.50
The problem that i have is that the line is always a 45 degrees line and the scatterplot is distorted with the points concentrated. This is because the values of the y axis are -predictably- going through the roof. The x axis that shows var2 looks fine.
I was wondering if there is a way to draw the line without the y axis taking the values of the function. Instead i would like only the slope of the line to change (beyond 45 degrees) and keep the original values of the variable (var1). This would not distort my graph.
Any ideas?
Thank you!!
Cynthia
Comment