Hello all,space.
I need to plot in log log scale and it is a scatter plot and I need to get the slope and intercept after fitting with linfit. This needs to be plotted in logarithmic space. And also the correlation coefficient needs to be calculated in log-log
I have 10 x values and 10 y values
is this correct plot, alog10(x), alog10(y)
or like this plot, x,y,/xlog,/ylog but I need the values in order to find the linfit.
how to do this
thanks
Hello all,space.
I need to plot in log log scale and it is a scatter plot and I need to get the slope and intercept after fitting with linfit. This needs to be plotted in logarithmic space. And also the correlation coefficient needs to be calculated in log-log
I have 10 x values and 10 y values
is this correct plot, alog10(x), alog10(y)
or like this plot, x,y,/xlog,/ylog but I need the values in order to find the linfit.
how to do this
thanks
On Tuesday, December 5, 2017 at 11:21:27 AM UTC-7, sid wrote:log space.
Hello all,
I need to plot in log log scale and it is a scatter plot and I need to get the slope and intercept after fitting with linfit. This needs to be plotted in logarithmic space. And also the correlation coefficient needs to be calculated in log-
I have 10 x values and 10 y values
is this correct plot, alog10(x), alog10(y)
or like this plot, x,y,/xlog,/ylog but I need the values in order to find the linfit.
how to do this
thanks
x = [1487.,500,24,3455,2233]
y = [11,50,2400,32.3,111]
fit = linfit(alog(x),alog(y))
xfit=[min(alog(x)),max(alog(x))]
yfit = xfit*fit[1]+fit[0]
p = plot(alog(x),alog(y),symbol='o',linestyle=6,color='blue',sym_filled=1)
p2 = plot(xfit,yfit,/overplot)
t = text(0.5,0.8,/normal,'Y = ' + strtrim(string(fit[1]),2) + ' X + ' + strtrim(string(fit[0]),2),color='red')
| Sysop: | Keyop |
|---|---|
| Location: | Huddersfield, West Yorkshire, UK |
| Users: | 715 |
| Nodes: | 16 (3 / 13) |
| Uptime: | 28:25:12 |
| Calls: | 12,107 |
| Calls today: | 7 |
| Files: | 15,006 |
| Messages: | 6,518,231 |