> You need to also close the output device, using dev.off() in R. Try:
>
> r.dev_off()
>
> at the end of your script.
This was the reason. Thanks!
Jorgen
--
Let Crystal Reports handle the reporting - Free Crystal Repo
Hi there,
I can't help you, but may be you miss one ) on the line of main?
bests
milton
2009/8/7 Jørgen Skancke
> Hi,
>
> I mange to import rpy to python and I can use R functions, but not plot.
> No plot window appears with this code:
>
> import rpy
> x = range(0, 10)
> y = [ 2*i for i in x ]
> As well, I cannot save plot to file, as can be seen from this example:
>
> my_x = [5.05, 6.75, 3.21, 2.66]
> my_y = [1.65, 26.5, -5.93, 7.96]
> ls_fit = r.lsfit(my_x,my_y)
> gradient = ls_fit['coefficients']['X']
> yintercept = ls_fit['coefficients']['Intercept']
> r.png("scatter_regression.png",
Hi,
I mange to import rpy to python and I can use R functions, but not plot.
No plot window appears with this code:
import rpy
x = range(0, 10)
y = [ 2*i for i in x ]
r.plot_default(x, y)
r.plot(x,y)
As well, I cannot save plot to file, as can be seen from this example:
my_x = [5.05, 6.75, 3.21