On Feb 7, 2008 4:27 AM, Jacob Hicks <[EMAIL PROTECTED]> wrote:
>
> Does this means that the only output of plotting R supports in sage
> instances that aren't compiled from source on a Linux machine with X
> development libraries installed is to .ps files?

Yes, that's true.

>  I knew that was true
> for source installs of sage.  I haven't ever used the binaries of
> sage, but it seems they could have the potential to support png output
> from R if they were compiled on a machine with the needed libraries.

They are built on fairly minimal machines, so that they will actually work.

Anyway, I hope an R expert such as you will improve matters regarding
R graphics in Sage.  Send us patches, etc.!

>
> On Feb 6, 2008 6:10 PM, William Stein <[EMAIL PROTECTED]> wrote:
> >
> >
> > On Feb 6, 2008 2:01 PM, Jacob Hicks <[EMAIL PROTECTED]> wrote:
> > >
> > > Plots can be displayed inline in the notebook.  Any image sent to
> > > os.curdir gets displayed in the notebook.  So all you have to do is
> > > tell r to send its images there.
> > > This is an example plotting with r to the notebook.
> > >
> > > from rpy import r
> > > r.png(os.curdir+'/sage.png')
> > >
> > > r.par(ann=0)
> > > values = [x for x in srange(0,float(pi),.1)]
> > > r.plot(values, [cos(x^2) for x in values], type='l')
> > > _ = r.dev_off()
> > >
> >
> > To avoid potential frustration, I just want to note that I tried
> > this on my OS X laptop and it does _not_ work:
> >
> >
> > {{{id=141|
> > from rpy import r
> > r.png(os.curdir+'/sage.png')
> >
> > r.par(ann=0)
> > values = [x for x in srange(0,float(pi),.1)]
> > r.plot(values, [cos(x^2) for x in values], type='l')
> > _ = r.dev_off()
> > ///
> > print "\x01r\x01e327"
> > Warning message:
> > In function (filename = "Rplot%03d.png", width = 480, height = 480,  :
> >   unable to open connection to X11 display ''
> > Traceback (most recent call last):
> > rpy.RPy_RException: Error in X11(paste("png::", filename, sep = ""),
> > width, height, pointsize,  :
> >   unable to start device PNG
> >
> > }}}
> >
> > >
> >
>
>
>
> --
> Jacob Hicks
> Mathematics Teacher
> Trinity Collegiate School
>
>
> >
>



-- 
William Stein
Associate Professor of Mathematics
University of Washington
http://wstein.org

--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to