|
View:
New views
14 Messages
—
Rating Filter:
Alert me
|
|
|
New version of X11, png and jpegR-devel has new versions of the X11(), png() and jpeg() devices on
Unix-alikes. The intention is that these are used identically to the previous versions (which remain available) but will produce higher-quality output with more features. Pros: Antialiasing of text and lines (can be turned off) but no blurring of fills. Buffering of the X11 display and fast repainting from a backing image. (The intention is to emulate the timer-based buffering of the windows() device in due course, but not for 2.7.0.) Ability to use translucent colours, including backgrounds, and produce partially transparent PNG files. Scalable text, including to sizes like 4.5 pt. This allows more accurate sizing on non-standard screen sizes (e.g. my home machine has a 90dpi 1650x1024 display whereas standard X11 fonts are set up for 75 or 100 dpi). Full support for UTF-8, so on systems with suitable fonts you can plot in many languages on a single figure (and this will work even in non-UTF-8 locales). The output should be locale-independent (unlike the current devices where even English text is rendered slightly differently in Latin-1 and UTF-8 locales). A utility function savePlot() to make a PNG/JPEG/TIFF copy of the current plot. The new png() and jpeg() devices do not require an X server to be running. Cons: Needs more software installed - cairo, pango and support packages (which on all the systems we have looked at are pulled in by the packages checked for). You will see something like Additional capabilities: PNG, JPEG, iconv, MBCS, NLS, cairo ^^^^^ if configure finds the software we are looking for. Slower under some circumstances (although on the test systems much faster than packages Cairo and cairoDevice). This will be particularly true for X11() with a slow connection between the machine running R and the X server. The additional software might not work correctly. The new versions are not currently the default, but can be made so by setting X11.options(type="Cairo"), e.g. as a load hook for package grDevices. I am using setHook(packageEvent("grDevices", "onLoad"), function(...) { grDevices::ps.options(horizontal=FALSE) if(getRversion() >= '2.7.0') grDevices::X11.options(type="Cairo") }) Please try these out and let us know how you get on. As a check, try the TestChars() examples in ?points - on one Solaris 10 system a few of the symbol font characters were incorrect. It worked on an FC5 system with auk% pkg-config --modversion pango 1.12.4 auk% pkg-config --modversion cairo 1.0.4 so the versions required are not all recent. Although these devices would in principle work on Mac OS X, neither cairo nor pango is readily available. We are working on other versions for Mac OS (X11 based on cairo/freetype, png/jpeg based on Quartz). There are also new svg() and tiff() devices. -- Brian D. Ripley, ripley@... Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UK Fax: +44 1865 272595 ______________________________________________ R-devel@... mailing list https://stat.ethz.ch/mailman/listinfo/r-devel |
|
|
Re: New version of X11, png and jpeg(Apologies, I meant to 'Reply to all' the first time but forgot).
I built r44608 of R-devel with (I think) cairo support. At least, that's what the configure script told me. In addition, 'capabilities("cairo")' is TRUE. Calling X11(type = "Cairo") gives me the error: Error in X11() : X11 module cannot be loaded In addition: Warning message: In X11() : unable to load shared library '/home/rpeng/install/R-devel/lib64/R/modules//R_X11.so': /home/rpeng/install/R-devel/lib64/R/modules//R_X11.so: undefined symbol: cairo_image_surface_get_data I figured I must be missing a library somewhere, but I'm not sure how to track down which one. Any thoughts here? I'm on a FC5 system with: cairo-devel-1.0.4-1 cairo-1.0.4-1 cairo-1.0.4-1 and pango-1.12.4-4 pango-devel-1.12.4-4 pango-1.12.4-4 Also, I have [rpeng@audrey R-source]$ pkg-config --modversion pango 1.12.4 [rpeng@audrey R-source]$ pkg-config --modversion cairo 1.0.4 -roger On Mon, Feb 25, 2008 at 11:56 AM, Prof Brian Ripley <ripley@...> wrote: > R-devel has new versions of the X11(), png() and jpeg() devices on > Unix-alikes. The intention is that these are used identically to the > previous versions (which remain available) but will produce higher-quality > output with more features. > > Pros: > > Antialiasing of text and lines (can be turned off) but no blurring of > fills. > > Buffering of the X11 display and fast repainting from a backing image. > (The intention is to emulate the timer-based buffering of the windows() > device in due course, but not for 2.7.0.) > > Ability to use translucent colours, including backgrounds, and produce > partially transparent PNG files. > > Scalable text, including to sizes like 4.5 pt. This allows more accurate > sizing on non-standard screen sizes (e.g. my home machine has a 90dpi > 1650x1024 display whereas standard X11 fonts are set up for 75 or 100 > dpi). > > Full support for UTF-8, so on systems with suitable fonts you can plot in > many languages on a single figure (and this will work even in non-UTF-8 > locales). The output should be locale-independent (unlike the current > devices where even English text is rendered slightly differently in > Latin-1 and UTF-8 locales). > > A utility function savePlot() to make a PNG/JPEG/TIFF copy of the current > plot. > > The new png() and jpeg() devices do not require an X server to be running. > > Cons: > > Needs more software installed - cairo, pango and support packages (which > on all the systems we have looked at are pulled in by the packages checked > for). You will see something like > > Additional capabilities: PNG, JPEG, iconv, MBCS, NLS, cairo > ^^^^^ > if configure finds the software we are looking for. > > Slower under some circumstances (although on the test systems much faster > than packages Cairo and cairoDevice). This will be particularly true for > X11() with a slow connection between the machine running R and the X > server. > > The additional software might not work correctly. > > > The new versions are not currently the default, but can be made so by > setting X11.options(type="Cairo"), e.g. as a load hook for package > grDevices. I am using > > setHook(packageEvent("grDevices", "onLoad"), > function(...) { > grDevices::ps.options(horizontal=FALSE) > if(getRversion() >= '2.7.0') grDevices::X11.options(type="Cairo") > }) > > > Please try these out and let us know how you get on. As a check, try the > TestChars() examples in ?points - on one Solaris 10 system a few of the > symbol font characters were incorrect. It worked on an FC5 system with > > auk% pkg-config --modversion pango > 1.12.4 > auk% pkg-config --modversion cairo > 1.0.4 > > so the versions required are not all recent. > > Although these devices would in principle work on Mac OS X, neither cairo > nor pango is readily available. We are working on other versions for > Mac OS (X11 based on cairo/freetype, png/jpeg based on Quartz). > > There are also new svg() and tiff() devices. > > -- > Brian D. Ripley, ripley@... > Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ > University of Oxford, Tel: +44 1865 272861 (self) > 1 South Parks Road, +44 1865 272866 (PA) > Oxford OX1 3TG, UK Fax: +44 1865 272595 > > ______________________________________________ > R-devel@... mailing list > https://stat.ethz.ch/mailman/listinfo/r-devel > -- Roger D. Peng | http://www.biostat.jhsph.edu/~rpeng/ ______________________________________________ R-devel@... mailing list https://stat.ethz.ch/mailman/listinfo/r-devel |
|
|
Re: New version of X11, png and jpegThat call is from Cairo 1.2, so looks like our test FC5 box had a later
version of the cairo libraries than the one pkg-config reported. You should be able to build with --without-cairo until such a time as we can add a suitable configure test. Thank you for the report. On Mon, 25 Feb 2008, Roger Peng wrote: > (Apologies, I meant to 'Reply to all' the first time but forgot). > > I built r44608 of R-devel with (I think) cairo support. At least, > that's what the configure script told me. In addition, > 'capabilities("cairo")' is TRUE. Calling X11(type = "Cairo") gives me > the error: > > Error in X11() : X11 module cannot be loaded > In addition: Warning message: > In X11() : > unable to load shared library > '/home/rpeng/install/R-devel/lib64/R/modules//R_X11.so': > /home/rpeng/install/R-devel/lib64/R/modules//R_X11.so: undefined > symbol: cairo_image_surface_get_data > > > I figured I must be missing a library somewhere, but I'm not sure how > to track down which one. Any thoughts here? > > I'm on a FC5 system with: > > cairo-devel-1.0.4-1 > cairo-1.0.4-1 > cairo-1.0.4-1 > > and > > pango-1.12.4-4 > pango-devel-1.12.4-4 > pango-1.12.4-4 > > Also, I have > > [rpeng@audrey R-source]$ pkg-config --modversion pango > 1.12.4 > [rpeng@audrey R-source]$ pkg-config --modversion cairo > 1.0.4 > > -roger > > On Mon, Feb 25, 2008 at 11:56 AM, Prof Brian Ripley > <ripley@...> wrote: >> R-devel has new versions of the X11(), png() and jpeg() devices on >> Unix-alikes. The intention is that these are used identically to the >> previous versions (which remain available) but will produce higher-quality >> output with more features. >> >> Pros: >> >> Antialiasing of text and lines (can be turned off) but no blurring of >> fills. >> >> Buffering of the X11 display and fast repainting from a backing image. >> (The intention is to emulate the timer-based buffering of the windows() >> device in due course, but not for 2.7.0.) >> >> Ability to use translucent colours, including backgrounds, and produce >> partially transparent PNG files. >> >> Scalable text, including to sizes like 4.5 pt. This allows more accurate >> sizing on non-standard screen sizes (e.g. my home machine has a 90dpi >> 1650x1024 display whereas standard X11 fonts are set up for 75 or 100 >> dpi). >> >> Full support for UTF-8, so on systems with suitable fonts you can plot in >> many languages on a single figure (and this will work even in non-UTF-8 >> locales). The output should be locale-independent (unlike the current >> devices where even English text is rendered slightly differently in >> Latin-1 and UTF-8 locales). >> >> A utility function savePlot() to make a PNG/JPEG/TIFF copy of the current >> plot. >> >> The new png() and jpeg() devices do not require an X server to be running. >> >> Cons: >> >> Needs more software installed - cairo, pango and support packages (which >> on all the systems we have looked at are pulled in by the packages checked >> for). You will see something like >> >> Additional capabilities: PNG, JPEG, iconv, MBCS, NLS, cairo >> ^^^^^ >> if configure finds the software we are looking for. >> >> Slower under some circumstances (although on the test systems much faster >> than packages Cairo and cairoDevice). This will be particularly true for >> X11() with a slow connection between the machine running R and the X >> server. >> >> The additional software might not work correctly. >> >> >> The new versions are not currently the default, but can be made so by >> setting X11.options(type="Cairo"), e.g. as a load hook for package >> grDevices. I am using >> >> setHook(packageEvent("grDevices", "onLoad"), >> function(...) { >> grDevices::ps.options(horizontal=FALSE) >> if(getRversion() >= '2.7.0') grDevices::X11.options(type="Cairo") >> }) >> >> >> Please try these out and let us know how you get on. As a check, try the >> TestChars() examples in ?points - on one Solaris 10 system a few of the >> symbol font characters were incorrect. It worked on an FC5 system with >> >> auk% pkg-config --modversion pango >> 1.12.4 >> auk% pkg-config --modversion cairo >> 1.0.4 >> >> so the versions required are not all recent. >> >> Although these devices would in principle work on Mac OS X, neither cairo >> nor pango is readily available. We are working on other versions for >> Mac OS (X11 based on cairo/freetype, png/jpeg based on Quartz). >> >> There are also new svg() and tiff() devices. >> >> -- >> Brian D. Ripley, ripley@... >> Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ >> University of Oxford, Tel: +44 1865 272861 (self) >> 1 South Parks Road, +44 1865 272866 (PA) >> Oxford OX1 3TG, UK Fax: +44 1865 272595 >> >> ______________________________________________ >> R-devel@... mailing list >> https://stat.ethz.ch/mailman/listinfo/r-devel >> > > > > -- > Roger D. Peng | http://www.biostat.jhsph.edu/~rpeng/ > -- Brian D. Ripley, ripley@... Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UK Fax: +44 1865 272595 ______________________________________________ R-devel@... mailing list https://stat.ethz.ch/mailman/listinfo/r-devel |
|
|
Re: New version of X11, png and jpegOn Mon, Feb 25, 2008 at 10:56 AM, Prof Brian Ripley <ripley@...>
wrote: > R-devel has new versions of the X11(), png() and jpeg() devices on > Unix-alikes. The intention is that these are used identically to the > previous versions (which remain available) but will produce higher-quality > output with more features. > > Pros: > > Antialiasing of text and lines (can be turned off) but no blurring of > fills. > > Buffering of the X11 display and fast repainting from a backing image. > (The intention is to emulate the timer-based buffering of the windows() > device in due course, but not for 2.7.0.) > > Ability to use translucent colours, including backgrounds, and produce > partially transparent PNG files. > > Scalable text, including to sizes like 4.5 pt. This allows more accurate > sizing on non-standard screen sizes (e.g. my home machine has a 90dpi > 1650x1024 display whereas standard X11 fonts are set up for 75 or 100 > dpi). > > Full support for UTF-8, so on systems with suitable fonts you can plot in > many languages on a single figure (and this will work even in non-UTF-8 > locales). The output should be locale-independent (unlike the current > devices where even English text is rendered slightly differently in > Latin-1 and UTF-8 locales). > > A utility function savePlot() to make a PNG/JPEG/TIFF copy of the current > plot. > > The new png() and jpeg() devices do not require an X server to be running. > > Cons: > > Needs more software installed - cairo, pango and support packages Would it be at all feasible to make the cairo backend available on all platforms and have it provide a public API through which an arbitrary cairo context could be passed as the drawing target? That would allow e.g. cairoDevice to be a much simpler module that draws the cairo context to a GTK+ window and manages the window and events. In that case, it would need to be renamed to 'gtkDevice2' or something. Michael (which > on all the systems we have looked at are pulled in by the packages checked > for). You will see something like > > Additional capabilities: PNG, JPEG, iconv, MBCS, NLS, cairo > ^^^^^ > if configure finds the software we are looking for. > > Slower under some circumstances (although on the test systems much faster > than packages Cairo and cairoDevice). This will be particularly true for > X11() with a slow connection between the machine running R and the X > server. > > The additional software might not work correctly. > > > The new versions are not currently the default, but can be made so by > setting X11.options(type="Cairo"), e.g. as a load hook for package > grDevices. I am using > > setHook(packageEvent("grDevices", "onLoad"), > function(...) { > grDevices::ps.options(horizontal=FALSE) > if(getRversion() >= '2.7.0') grDevices::X11.options(type="Cairo") > }) > > > Please try these out and let us know how you get on. As a check, try the > TestChars() examples in ?points - on one Solaris 10 system a few of the > symbol font characters were incorrect. It worked on an FC5 system with > > auk% pkg-config --modversion pango > 1.12.4 > auk% pkg-config --modversion cairo > 1.0.4 > > so the versions required are not all recent. > > Although these devices would in principle work on Mac OS X, neither cairo > nor pango is readily available. We are working on other versions for > Mac OS (X11 based on cairo/freetype, png/jpeg based on Quartz). > > There are also new svg() and tiff() devices. > > -- > Brian D. Ripley, ripley@... > Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/<http://www.stats.ox.ac.uk/%7Eripley/> > University of Oxford, Tel: +44 1865 272861 (self) > 1 South Parks Road, +44 1865 272866 (PA) > Oxford OX1 3TG, UK Fax: +44 1865 272595 > > ______________________________________________ > R-devel@... mailing list > https://stat.ethz.ch/mailman/listinfo/r-devel > [[alternative HTML version deleted]] ______________________________________________ R-devel@... mailing list https://stat.ethz.ch/mailman/listinfo/r-devel |
|
|
Re: New version of X11, png and jpegMichael,
> Would it be at all feasible to make the cairo backend available on > all platforms and have it provide a public API through which an > arbitrary cairo context could be passed as the drawing target? Offering an API is something I have considered for the TODO for 2.8.0. However, we are at the stage of finding out how widely this can be got to work and how well it works. Simon and I are working on MacOS X, and should have this working via a static cairo build (without pango) shortly. I don't think cairo on Windows works well enough: e.g. your Cairo() device has more than half the glyphs missing in the symbol font. Brian On Mon, 25 Feb 2008, Michael Lawrence wrote: > On Mon, Feb 25, 2008 at 10:56 AM, Prof Brian Ripley <ripley@...> > wrote: > >> R-devel has new versions of the X11(), png() and jpeg() devices on >> Unix-alikes. The intention is that these are used identically to the >> previous versions (which remain available) but will produce higher-quality >> output with more features. >> >> Pros: >> >> Antialiasing of text and lines (can be turned off) but no blurring of >> fills. >> >> Buffering of the X11 display and fast repainting from a backing image. >> (The intention is to emulate the timer-based buffering of the windows() >> device in due course, but not for 2.7.0.) >> >> Ability to use translucent colours, including backgrounds, and produce >> partially transparent PNG files. >> >> Scalable text, including to sizes like 4.5 pt. This allows more accurate >> sizing on non-standard screen sizes (e.g. my home machine has a 90dpi >> 1650x1024 display whereas standard X11 fonts are set up for 75 or 100 >> dpi). >> >> Full support for UTF-8, so on systems with suitable fonts you can plot in >> many languages on a single figure (and this will work even in non-UTF-8 >> locales). The output should be locale-independent (unlike the current >> devices where even English text is rendered slightly differently in >> Latin-1 and UTF-8 locales). >> >> A utility function savePlot() to make a PNG/JPEG/TIFF copy of the current >> plot. >> >> The new png() and jpeg() devices do not require an X server to be running. >> >> Cons: >> >> Needs more software installed - cairo, pango and support packages > > > Would it be at all feasible to make the cairo backend available on all > platforms and have it provide a public API through which an arbitrary cairo > context could be passed as the drawing target? That would allow e.g. > cairoDevice to be a much simpler module that draws the cairo context to a > GTK+ window and manages the window and events. In that case, it would need > to be renamed to 'gtkDevice2' or something. > > Michael > > (which >> on all the systems we have looked at are pulled in by the packages checked >> for). You will see something like >> >> Additional capabilities: PNG, JPEG, iconv, MBCS, NLS, cairo >> ^^^^^ >> if configure finds the software we are looking for. >> >> Slower under some circumstances (although on the test systems much faster >> than packages Cairo and cairoDevice). This will be particularly true for >> X11() with a slow connection between the machine running R and the X >> server. >> >> The additional software might not work correctly. >> >> >> The new versions are not currently the default, but can be made so by >> setting X11.options(type="Cairo"), e.g. as a load hook for package >> grDevices. I am using >> >> setHook(packageEvent("grDevices", "onLoad"), >> function(...) { >> grDevices::ps.options(horizontal=FALSE) >> if(getRversion() >= '2.7.0') grDevices::X11.options(type="Cairo") >> }) >> >> >> Please try these out and let us know how you get on. As a check, try the >> TestChars() examples in ?points - on one Solaris 10 system a few of the >> symbol font characters were incorrect. It worked on an FC5 system with >> >> auk% pkg-config --modversion pango >> 1.12.4 >> auk% pkg-config --modversion cairo >> 1.0.4 >> >> so the versions required are not all recent. >> >> Although these devices would in principle work on Mac OS X, neither cairo >> nor pango is readily available. We are working on other versions for >> Mac OS (X11 based on cairo/freetype, png/jpeg based on Quartz). >> >> There are also new svg() and tiff() devices. >> >> -- >> Brian D. Ripley, ripley@... >> Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/<http://www.stats.ox.ac.uk/%7Eripley/> >> University of Oxford, Tel: +44 1865 272861 (self) >> 1 South Parks Road, +44 1865 272866 (PA) >> Oxford OX1 3TG, UK Fax: +44 1865 272595 >> >> ______________________________________________ >> R-devel@... mailing list >> https://stat.ethz.ch/mailman/listinfo/r-devel >> > -- Brian D. Ripley, ripley@... Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UK Fax: +44 1865 272595 ______________________________________________ R-devel@... mailing list https://stat.ethz.ch/mailman/listinfo/r-devel |
|
|
Re: New version of X11, png and jpegRevision r44621 supports (in a limited way) cairo 1.0 and hence I believe
vanilla FC5 -- I found what purports to be a vanilla FC5 box and it works quite well there. Two people have reported that the svg(), cairo-pdf() and cairo-ps() devices produce blank (but not empty) files. I was able to confirm that on Debian etch (cairo 1.2.4). They do work on cairo 1.4.14 (F8) and better on a 1.5.10 snapshot. We've got a working version on Mac OS X, but you need to install cairo. Finally, the quality of the fonts you see will depend on what fonts you have installed: if you only have X11 bitmapped fonts, that is what you will get (and I am getting on our minimally configured Debian etch machine). Our Fedora installations are mainly using the URW Type 1 fonts in the urw-fonts RPM. One of the alternatives is RH's liberation fonts (https://www.redhat.com/promo/fonts/). On Mon, 25 Feb 2008, Prof Brian Ripley wrote: > That call is from Cairo 1.2, so looks like our test FC5 box had a later > version of the cairo libraries than the one pkg-config reported. > > You should be able to build with --without-cairo until such a time as we can > add a suitable configure test. > > Thank you for the report. > > On Mon, 25 Feb 2008, Roger Peng wrote: > >> (Apologies, I meant to 'Reply to all' the first time but forgot). >> >> I built r44608 of R-devel with (I think) cairo support. At least, >> that's what the configure script told me. In addition, >> 'capabilities("cairo")' is TRUE. Calling X11(type = "Cairo") gives me >> the error: >> >> Error in X11() : X11 module cannot be loaded >> In addition: Warning message: >> In X11() : >> unable to load shared library >> '/home/rpeng/install/R-devel/lib64/R/modules//R_X11.so': >> /home/rpeng/install/R-devel/lib64/R/modules//R_X11.so: undefined >> symbol: cairo_image_surface_get_data >> >> >> I figured I must be missing a library somewhere, but I'm not sure how >> to track down which one. Any thoughts here? >> >> I'm on a FC5 system with: >> >> cairo-devel-1.0.4-1 >> cairo-1.0.4-1 >> cairo-1.0.4-1 >> >> and >> >> pango-1.12.4-4 >> pango-devel-1.12.4-4 >> pango-1.12.4-4 >> >> Also, I have >> >> [rpeng@audrey R-source]$ pkg-config --modversion pango >> 1.12.4 >> [rpeng@audrey R-source]$ pkg-config --modversion cairo >> 1.0.4 >> >> -roger >> >> On Mon, Feb 25, 2008 at 11:56 AM, Prof Brian Ripley >> <ripley@...> wrote: >>> R-devel has new versions of the X11(), png() and jpeg() devices on >>> Unix-alikes. The intention is that these are used identically to the >>> previous versions (which remain available) but will produce >>> higher-quality >>> output with more features. >>> >>> Pros: >>> >>> Antialiasing of text and lines (can be turned off) but no blurring of >>> fills. >>> >>> Buffering of the X11 display and fast repainting from a backing image. >>> (The intention is to emulate the timer-based buffering of the windows() >>> device in due course, but not for 2.7.0.) >>> >>> Ability to use translucent colours, including backgrounds, and produce >>> partially transparent PNG files. >>> >>> Scalable text, including to sizes like 4.5 pt. This allows more accurate >>> sizing on non-standard screen sizes (e.g. my home machine has a 90dpi >>> 1650x1024 display whereas standard X11 fonts are set up for 75 or 100 >>> dpi). >>> >>> Full support for UTF-8, so on systems with suitable fonts you can plot in >>> many languages on a single figure (and this will work even in non-UTF-8 >>> locales). The output should be locale-independent (unlike the current >>> devices where even English text is rendered slightly differently in >>> Latin-1 and UTF-8 locales). >>> >>> A utility function savePlot() to make a PNG/JPEG/TIFF copy of the current >>> plot. >>> >>> The new png() and jpeg() devices do not require an X server to be >>> running. >>> >>> Cons: >>> >>> Needs more software installed - cairo, pango and support packages (which >>> on all the systems we have looked at are pulled in by the packages >>> checked >>> for). You will see something like >>> >>> Additional capabilities: PNG, JPEG, iconv, MBCS, NLS, cairo >>> ^^^^^ >>> if configure finds the software we are looking for. >>> >>> Slower under some circumstances (although on the test systems much faster >>> than packages Cairo and cairoDevice). This will be particularly true for >>> X11() with a slow connection between the machine running R and the X >>> server. >>> >>> The additional software might not work correctly. >>> >>> >>> The new versions are not currently the default, but can be made so by >>> setting X11.options(type="Cairo"), e.g. as a load hook for package >>> grDevices. I am using >>> >>> setHook(packageEvent("grDevices", "onLoad"), >>> function(...) { >>> grDevices::ps.options(horizontal=FALSE) >>> if(getRversion() >= '2.7.0') grDevices::X11.options(type="Cairo") >>> }) >>> >>> >>> Please try these out and let us know how you get on. As a check, try the >>> TestChars() examples in ?points - on one Solaris 10 system a few of the >>> symbol font characters were incorrect. It worked on an FC5 system with >>> >>> auk% pkg-config --modversion pango >>> 1.12.4 >>> auk% pkg-config --modversion cairo >>> 1.0.4 >>> >>> so the versions required are not all recent. >>> >>> Although these devices would in principle work on Mac OS X, neither cairo >>> nor pango is readily available. We are working on other versions for >>> Mac OS (X11 based on cairo/freetype, png/jpeg based on Quartz). >>> >>> There are also new svg() and tiff() devices. >>> >>> -- >>> Brian D. Ripley, ripley@... >>> Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ >>> University of Oxford, Tel: +44 1865 272861 (self) >>> 1 South Parks Road, +44 1865 272866 (PA) >>> Oxford OX1 3TG, UK Fax: +44 1865 272595 >>> >>> ______________________________________________ >>> R-devel@... mailing list >>> https://stat.ethz.ch/mailman/listinfo/r-devel >>> >> >> >> >> -- >> Roger D. Peng | http://www.biostat.jhsph.edu/~rpeng/ >> > > -- > Brian D. Ripley, ripley@... > Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ > University of Oxford, Tel: +44 1865 272861 (self) > 1 South Parks Road, +44 1865 272866 (PA) > Oxford OX1 3TG, UK Fax: +44 1865 272595 > -- Brian D. Ripley, ripley@... Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UK Fax: +44 1865 272595 ______________________________________________ R-devel@... mailing list https://stat.ethz.ch/mailman/listinfo/r-devel |
|
|
Re: New version of X11, png and jpegThanks, running r44621 works well (on my FC5 box) and I can make various plots
(I just did some limited testing). When I run the 'TestChars()' example in 'points' I get many warnings of the form: 1: In plot.xy(xy.coords(x, y), type = type, ...) : pch value '128' is invalid in this locale 2: In plot.xy(xy.coords(x, y), type = type, ...) : pch value '129' is invalid in this locale 3: In plot.xy(xy.coords(x, y), type = type, ...) : pch value '130' is invalid in this locale The warnings go until 49: In plot.xy(xy.coords(x, y), type = type, ...) : pch value '176' is invalid in this locale 50: In plot.xy(xy.coords(x, y), type = type, ...) : pch value '177' is invalid in this locale after which I think the warnings are not saved. Given the note in 'points' I sense this is expected? TestChars(sign = -1) and TestChars(font = 5) do not give any warnings but some odd looking characters do appear on the device. Here is my sessionInfo: > sessionInfo() R version 2.7.0 Under development (unstable) (--) x86_64-unknown-linux-gnu locale: LC_CTYPE=en_US.UTF-8;LC_NUMERIC=C;LC_TIME=en_US.UTF-8;LC_COLLATE=en_US.UTF-8;LC_MONETARY=en_US.UTF-8;LC_MESSAGES=en_US.UTF-8;LC_PAPER=en_US.UTF-8;LC_NAME=C;LC_ADDRESS=C;LC_TELEPHONE=C;LC_MEASUREMENT=en_US.UTF-8;LC_IDENTIFICATION=C attached base packages: [1] stats graphics grDevices utils datasets methods base other attached packages: [1] lattice_0.17-6 RColorBrewer_1.0-2 cacher_0.1-1 loaded via a namespace (and not attached): [1] digest_0.3.1 grid_2.7.0 tools_2.7.0 -roger Prof Brian Ripley wrote: > Revision r44621 supports (in a limited way) cairo 1.0 and hence I believe > vanilla FC5 -- I found what purports to be a vanilla FC5 box and it works > quite well there. > > Two people have reported that the svg(), cairo-pdf() and cairo-ps() > devices produce blank (but not empty) files. I was able to confirm that > on Debian etch (cairo 1.2.4). They do work on cairo 1.4.14 (F8) and > better on a 1.5.10 snapshot. > > We've got a working version on Mac OS X, but you need to install cairo. > > Finally, the quality of the fonts you see will depend on what fonts you > have installed: if you only have X11 bitmapped fonts, that is what you > will get (and I am getting on our minimally configured Debian etch > machine). Our Fedora installations are mainly using the URW Type 1 fonts > in the urw-fonts RPM. One of the alternatives is RH's liberation fonts > (https://www.redhat.com/promo/fonts/). > > On Mon, 25 Feb 2008, Prof Brian Ripley wrote: > >> That call is from Cairo 1.2, so looks like our test FC5 box had a later >> version of the cairo libraries than the one pkg-config reported. >> >> You should be able to build with --without-cairo until such a time as we can >> add a suitable configure test. >> >> Thank you for the report. >> >> On Mon, 25 Feb 2008, Roger Peng wrote: >> >>> (Apologies, I meant to 'Reply to all' the first time but forgot). >>> >>> I built r44608 of R-devel with (I think) cairo support. At least, >>> that's what the configure script told me. In addition, >>> 'capabilities("cairo")' is TRUE. Calling X11(type = "Cairo") gives me >>> the error: >>> >>> Error in X11() : X11 module cannot be loaded >>> In addition: Warning message: >>> In X11() : >>> unable to load shared library >>> '/home/rpeng/install/R-devel/lib64/R/modules//R_X11.so': >>> /home/rpeng/install/R-devel/lib64/R/modules//R_X11.so: undefined >>> symbol: cairo_image_surface_get_data >>> >>> >>> I figured I must be missing a library somewhere, but I'm not sure how >>> to track down which one. Any thoughts here? >>> >>> I'm on a FC5 system with: >>> >>> cairo-devel-1.0.4-1 >>> cairo-1.0.4-1 >>> cairo-1.0.4-1 >>> >>> and >>> >>> pango-1.12.4-4 >>> pango-devel-1.12.4-4 >>> pango-1.12.4-4 >>> >>> Also, I have >>> >>> [rpeng@audrey R-source]$ pkg-config --modversion pango >>> 1.12.4 >>> [rpeng@audrey R-source]$ pkg-config --modversion cairo >>> 1.0.4 >>> >>> -roger >>> >>> On Mon, Feb 25, 2008 at 11:56 AM, Prof Brian Ripley >>> <ripley@...> wrote: >>>> R-devel has new versions of the X11(), png() and jpeg() devices on >>>> Unix-alikes. The intention is that these are used identically to the >>>> previous versions (which remain available) but will produce >>>> higher-quality >>>> output with more features. >>>> >>>> Pros: >>>> >>>> Antialiasing of text and lines (can be turned off) but no blurring of >>>> fills. >>>> >>>> Buffering of the X11 display and fast repainting from a backing image. >>>> (The intention is to emulate the timer-based buffering of the windows() >>>> device in due course, but not for 2.7.0.) >>>> >>>> Ability to use translucent colours, including backgrounds, and produce >>>> partially transparent PNG files. >>>> >>>> Scalable text, including to sizes like 4.5 pt. This allows more accurate >>>> sizing on non-standard screen sizes (e.g. my home machine has a 90dpi >>>> 1650x1024 display whereas standard X11 fonts are set up for 75 or 100 >>>> dpi). >>>> >>>> Full support for UTF-8, so on systems with suitable fonts you can plot in >>>> many languages on a single figure (and this will work even in non-UTF-8 >>>> locales). The output should be locale-independent (unlike the current >>>> devices where even English text is rendered slightly differently in >>>> Latin-1 and UTF-8 locales). >>>> >>>> A utility function savePlot() to make a PNG/JPEG/TIFF copy of the current >>>> plot. >>>> >>>> The new png() and jpeg() devices do not require an X server to be >>>> running. >>>> >>>> Cons: >>>> >>>> Needs more software installed - cairo, pango and support packages (which >>>> on all the systems we have looked at are pulled in by the packages >>>> checked >>>> for). You will see something like >>>> >>>> Additional capabilities: PNG, JPEG, iconv, MBCS, NLS, cairo >>>> ^^^^^ >>>> if configure finds the software we are looking for. >>>> >>>> Slower under some circumstances (although on the test systems much faster >>>> than packages Cairo and cairoDevice). This will be particularly true for >>>> X11() with a slow connection between the machine running R and the X >>>> server. >>>> >>>> The additional software might not work correctly. >>>> >>>> >>>> The new versions are not currently the default, but can be made so by >>>> setting X11.options(type="Cairo"), e.g. as a load hook for package >>>> grDevices. I am using >>>> >>>> setHook(packageEvent("grDevices", "onLoad"), >>>> function(...) { >>>> grDevices::ps.options(horizontal=FALSE) >>>> if(getRversion() >= '2.7.0') grDevices::X11.options(type="Cairo") >>>> }) >>>> >>>> >>>> Please try these out and let us know how you get on. As a check, try the >>>> TestChars() examples in ?points - on one Solaris 10 system a few of the >>>> symbol font characters were incorrect. It worked on an FC5 system with >>>> >>>> auk% pkg-config --modversion pango >>>> 1.12.4 >>>> auk% pkg-config --modversion cairo >>>> 1.0.4 >>>> >>>> so the versions required are not all recent. >>>> >>>> Although these devices would in principle work on Mac OS X, neither cairo >>>> nor pango is readily available. We are working on other versions for >>>> Mac OS (X11 based on cairo/freetype, png/jpeg based on Quartz). >>>> >>>> There are also new svg() and tiff() devices. >>>> >>>> -- >>>> Brian D. Ripley, ripley@... >>>> Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ >>>> University of Oxford, Tel: +44 1865 272861 (self) >>>> 1 South Parks Road, +44 1865 272866 (PA) >>>> Oxford OX1 3TG, UK Fax: +44 1865 272595 >>>> >>>> ______________________________________________ >>>> R-devel@... mailing list >>>> https://stat.ethz.ch/mailman/listinfo/r-devel >>>> >>> >>> >>> -- >>> Roger D. Peng | http://www.biostat.jhsph.edu/~rpeng/ >>> >> -- >> Brian D. Ripley, ripley@... >> Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ >> University of Oxford, Tel: +44 1865 272861 (self) >> 1 South Parks Road, +44 1865 272866 (PA) >> Oxford OX1 3TG, UK Fax: +44 1865 272595 >> > -- Roger D. Peng | http://www.biostat.jhsph.edu/~rpeng/ ______________________________________________ R-devel@... mailing list https://stat.ethz.ch/mailman/listinfo/r-devel |
|
|
Re: New version of X11, png and jpegOn Tue, 26 Feb 2008, Roger D. Peng wrote:
> Thanks, running r44621 works well (on my FC5 box) and I can make various > plots (I just did some limited testing). > > When I run the 'TestChars()' example in 'points' I get many warnings of the > form: > > 1: In plot.xy(xy.coords(x, y), type = type, ...) : > pch value '128' is invalid in this locale > 2: In plot.xy(xy.coords(x, y), type = type, ...) : > pch value '129' is invalid in this locale > 3: In plot.xy(xy.coords(x, y), type = type, ...) : > pch value '130' is invalid in this locale > > The warnings go until > > 49: In plot.xy(xy.coords(x, y), type = type, ...) : > pch value '176' is invalid in this locale > 50: In plot.xy(xy.coords(x, y), type = type, ...) : > pch value '177' is invalid in this locale > > after which I think the warnings are not saved. Given the note in 'points' I > sense this is expected? In a UTF_8 locale, yes. Not in a, say, Latin-1 locale. > TestChars(sign = -1) and TestChars(font = 5) do not give any warnings but > some odd looking characters do appear on the device. > > Here is my sessionInfo: > >> sessionInfo() > R version 2.7.0 Under development (unstable) (--) > x86_64-unknown-linux-gnu > > locale: > LC_CTYPE=en_US.UTF-8;LC_NUMERIC=C;LC_TIME=en_US.UTF-8;LC_COLLATE=en_US.UTF-8;LC_MONETARY=en_US.UTF-8;LC_MESSAGES=en_US.UTF-8;LC_PAPER=en_US.UTF-8;LC_NAME=C;LC_ADDRESS=C;LC_TELEPHONE=C;LC_MEASUREMENT=en_US.UTF-8;LC_IDENTIFICATION=C > > attached base packages: > [1] stats graphics grDevices utils datasets methods base > > other attached packages: > [1] lattice_0.17-6 RColorBrewer_1.0-2 cacher_0.1-1 > > loaded via a namespace (and not attached): > [1] digest_0.3.1 grid_2.7.0 tools_2.7.0 > > > -roger > > Prof Brian Ripley wrote: >> Revision r44621 supports (in a limited way) cairo 1.0 and hence I believe >> vanilla FC5 -- I found what purports to be a vanilla FC5 box and it works >> quite well there. >> >> Two people have reported that the svg(), cairo-pdf() and cairo-ps() devices >> produce blank (but not empty) files. I was able to confirm that on Debian >> etch (cairo 1.2.4). They do work on cairo 1.4.14 (F8) and better on a >> 1.5.10 snapshot. >> >> We've got a working version on Mac OS X, but you need to install cairo. >> >> Finally, the quality of the fonts you see will depend on what fonts you >> have installed: if you only have X11 bitmapped fonts, that is what you will >> get (and I am getting on our minimally configured Debian etch machine). >> Our Fedora installations are mainly using the URW Type 1 fonts in the >> urw-fonts RPM. One of the alternatives is RH's liberation fonts >> (https://www.redhat.com/promo/fonts/). >> >> On Mon, 25 Feb 2008, Prof Brian Ripley wrote: >> >>> That call is from Cairo 1.2, so looks like our test FC5 box had a later >>> version of the cairo libraries than the one pkg-config reported. >>> >>> You should be able to build with --without-cairo until such a time as we >>> can add a suitable configure test. >>> >>> Thank you for the report. >>> >>> On Mon, 25 Feb 2008, Roger Peng wrote: >>> >>>> (Apologies, I meant to 'Reply to all' the first time but forgot). >>>> >>>> I built r44608 of R-devel with (I think) cairo support. At least, >>>> that's what the configure script told me. In addition, >>>> 'capabilities("cairo")' is TRUE. Calling X11(type = "Cairo") gives me >>>> the error: >>>> >>>> Error in X11() : X11 module cannot be loaded >>>> In addition: Warning message: >>>> In X11() : >>>> unable to load shared library >>>> '/home/rpeng/install/R-devel/lib64/R/modules//R_X11.so': >>>> /home/rpeng/install/R-devel/lib64/R/modules//R_X11.so: undefined >>>> symbol: cairo_image_surface_get_data >>>> >>>> >>>> I figured I must be missing a library somewhere, but I'm not sure how >>>> to track down which one. Any thoughts here? >>>> >>>> I'm on a FC5 system with: >>>> >>>> cairo-devel-1.0.4-1 >>>> cairo-1.0.4-1 >>>> cairo-1.0.4-1 >>>> >>>> and >>>> >>>> pango-1.12.4-4 >>>> pango-devel-1.12.4-4 >>>> pango-1.12.4-4 >>>> >>>> Also, I have >>>> >>>> [rpeng@audrey R-source]$ pkg-config --modversion pango >>>> 1.12.4 >>>> [rpeng@audrey R-source]$ pkg-config --modversion cairo >>>> 1.0.4 >>>> >>>> -roger >>>> >>>> On Mon, Feb 25, 2008 at 11:56 AM, Prof Brian Ripley >>>> <ripley@...> wrote: >>>>> R-devel has new versions of the X11(), png() and jpeg() devices on >>>>> Unix-alikes. The intention is that these are used identically to the >>>>> previous versions (which remain available) but will produce >>>>> higher-quality >>>>> output with more features. >>>>> >>>>> Pros: >>>>> >>>>> Antialiasing of text and lines (can be turned off) but no blurring of >>>>> fills. >>>>> >>>>> Buffering of the X11 display and fast repainting from a backing image. >>>>> (The intention is to emulate the timer-based buffering of the windows() >>>>> device in due course, but not for 2.7.0.) >>>>> >>>>> Ability to use translucent colours, including backgrounds, and produce >>>>> partially transparent PNG files. >>>>> >>>>> Scalable text, including to sizes like 4.5 pt. This allows more >>>>> accurate >>>>> sizing on non-standard screen sizes (e.g. my home machine has a 90dpi >>>>> 1650x1024 display whereas standard X11 fonts are set up for 75 or 100 >>>>> dpi). >>>>> >>>>> Full support for UTF-8, so on systems with suitable fonts you can plot >>>>> in >>>>> many languages on a single figure (and this will work even in non-UTF-8 >>>>> locales). The output should be locale-independent (unlike the current >>>>> devices where even English text is rendered slightly differently in >>>>> Latin-1 and UTF-8 locales). >>>>> >>>>> A utility function savePlot() to make a PNG/JPEG/TIFF copy of the >>>>> current >>>>> plot. >>>>> >>>>> The new png() and jpeg() devices do not require an X server to be >>>>> running. >>>>> >>>>> Cons: >>>>> >>>>> Needs more software installed - cairo, pango and support packages >>>>> (which >>>>> on all the systems we have looked at are pulled in by the packages >>>>> checked >>>>> for). You will see something like >>>>> >>>>> Additional capabilities: PNG, JPEG, iconv, MBCS, NLS, cairo >>>>> ^^^^^ >>>>> if configure finds the software we are looking for. >>>>> >>>>> Slower under some circumstances (although on the test systems much >>>>> faster >>>>> than packages Cairo and cairoDevice). This will be particularly true >>>>> for >>>>> X11() with a slow connection between the machine running R and the X >>>>> server. >>>>> >>>>> The additional software might not work correctly. >>>>> >>>>> >>>>> The new versions are not currently the default, but can be made so by >>>>> setting X11.options(type="Cairo"), e.g. as a load hook for package >>>>> grDevices. I am using >>>>> >>>>> setHook(packageEvent("grDevices", "onLoad"), >>>>> function(...) { >>>>> grDevices::ps.options(horizontal=FALSE) >>>>> if(getRversion() >= '2.7.0') >>>>> grDevices::X11.options(type="Cairo") >>>>> }) >>>>> >>>>> >>>>> Please try these out and let us know how you get on. As a check, try >>>>> the >>>>> TestChars() examples in ?points - on one Solaris 10 system a few of the >>>>> symbol font characters were incorrect. It worked on an FC5 system with >>>>> >>>>> auk% pkg-config --modversion pango >>>>> 1.12.4 >>>>> auk% pkg-config --modversion cairo >>>>> 1.0.4 >>>>> >>>>> so the versions required are not all recent. >>>>> >>>>> Although these devices would in principle work on Mac OS X, neither >>>>> cairo >>>>> nor pango is readily available. We are working on other versions for >>>>> Mac OS (X11 based on cairo/freetype, png/jpeg based on Quartz). >>>>> >>>>> There are also new svg() and tiff() devices. >>>>> >>>>> -- >>>>> Brian D. Ripley, ripley@... >>>>> Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ >>>>> University of Oxford, Tel: +44 1865 272861 (self) >>>>> 1 South Parks Road, +44 1865 272866 (PA) >>>>> Oxford OX1 3TG, UK Fax: +44 1865 272595 >>>>> >>>>> ______________________________________________ >>>>> R-devel@... mailing list >>>>> https://stat.ethz.ch/mailman/listinfo/r-devel >>>>> >>>> >>>> >>>> -- >>>> Roger D. Peng | http://www.biostat.jhsph.edu/~rpeng/ >>>> >>> -- >>> Brian D. Ripley, ripley@... >>> Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ >>> University of Oxford, Tel: +44 1865 272861 (self) >>> 1 South Parks Road, +44 1865 272866 (PA) >>> Oxford OX1 3TG, UK Fax: +44 1865 272595 >>> >> > > -- > Roger D. Peng | http://www.biostat.jhsph.edu/~rpeng/ > -- Brian D. Ripley, ripley@... Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UK Fax: +44 1865 272595 ______________________________________________ R-devel@... mailing list https://stat.ethz.ch/mailman/listinfo/r-devel |
|
|
Re: New version of X11, png and jpegOn Tue, Feb 26, 2008 at 1:00 AM, Prof Brian Ripley <ripley@...>
wrote: > Michael, > > > Would it be at all feasible to make the cairo backend available on > > all platforms and have it provide a public API through which an > > arbitrary cairo context could be passed as the drawing target? > > Offering an API is something I have considered for the TODO for 2.8.0. > However, we are at the stage of finding out how widely this can be got to > work and how well it works. > This is reasonable. > > Simon and I are working on MacOS X, and should have this working via a > static cairo build (without pango) shortly. Great. > I don't think cairo on > Windows works well enough: e.g. your Cairo() device has more than half the > glyphs missing in the symbol font. > There are certainly issues. Hopefully most of those will be ironed out as more win32 programs rely on Cairo (e.g. Firefox 3.0). > > Brian > > > On Mon, 25 Feb 2008, Michael Lawrence wrote: > > > On Mon, Feb 25, 2008 at 10:56 AM, Prof Brian Ripley < > ripley@...> > > wrote: > > > >> R-devel has new versions of the X11(), png() and jpeg() devices on > >> Unix-alikes. The intention is that these are used identically to the > >> previous versions (which remain available) but will produce > higher-quality > >> output with more features. > >> > >> Pros: > >> > >> Antialiasing of text and lines (can be turned off) but no blurring of > >> fills. > >> > >> Buffering of the X11 display and fast repainting from a backing image. > >> (The intention is to emulate the timer-based buffering of the windows() > >> device in due course, but not for 2.7.0.) > >> > >> Ability to use translucent colours, including backgrounds, and produce > >> partially transparent PNG files. > >> > >> Scalable text, including to sizes like 4.5 pt. This allows more > accurate > >> sizing on non-standard screen sizes (e.g. my home machine has a 90dpi > >> 1650x1024 display whereas standard X11 fonts are set up for 75 or 100 > >> dpi). > >> > >> Full support for UTF-8, so on systems with suitable fonts you can plot > in > >> many languages on a single figure (and this will work even in non-UTF-8 > >> locales). The output should be locale-independent (unlike the current > >> devices where even English text is rendered slightly differently in > >> Latin-1 and UTF-8 locales). > >> > >> A utility function savePlot() to make a PNG/JPEG/TIFF copy of the > current > >> plot. > >> > >> The new png() and jpeg() devices do not require an X server to be > running. > >> > >> Cons: > >> > >> Needs more software installed - cairo, pango and support packages > > > > > > Would it be at all feasible to make the cairo backend available on all > > platforms and have it provide a public API through which an arbitrary > cairo > > context could be passed as the drawing target? That would allow e.g. > > cairoDevice to be a much simpler module that draws the cairo context to > a > > GTK+ window and manages the window and events. In that case, it would > need > > to be renamed to 'gtkDevice2' or something. > > > > Michael > > > > (which > >> on all the systems we have looked at are pulled in by the packages > checked > >> for). You will see something like > >> > >> Additional capabilities: PNG, JPEG, iconv, MBCS, NLS, cairo > >> ^^^^^ > >> if configure finds the software we are looking for. > >> > >> Slower under some circumstances (although on the test systems much > faster > >> than packages Cairo and cairoDevice). This will be particularly true > for > >> X11() with a slow connection between the machine running R and the X > >> server. > >> > >> The additional software might not work correctly. > >> > >> > >> The new versions are not currently the default, but can be made so by > >> setting X11.options(type="Cairo"), e.g. as a load hook for package > >> grDevices. I am using > >> > >> setHook(packageEvent("grDevices", "onLoad"), > >> function(...) { > >> grDevices::ps.options(horizontal=FALSE) > >> if(getRversion() >= '2.7.0') grDevices::X11.options > (type="Cairo") > >> }) > >> > >> > >> Please try these out and let us know how you get on. As a check, try > the > >> TestChars() examples in ?points - on one Solaris 10 system a few of the > >> symbol font characters were incorrect. It worked on an FC5 system with > >> > >> auk% pkg-config --modversion pango > >> 1.12.4 > >> auk% pkg-config --modversion cairo > >> 1.0.4 > >> > >> so the versions required are not all recent. > >> > >> Although these devices would in principle work on Mac OS X, neither > cairo > >> nor pango is readily available. We are working on other versions for > >> Mac OS (X11 based on cairo/freetype, png/jpeg based on Quartz). > >> > >> There are also new svg() and tiff() devices. > >> > >> -- > >> Brian D. Ripley, ripley@... > >> Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/<http://www.stats.ox.ac.uk/%7Eripley/> > <http://www.stats.ox.ac.uk/%7Eripley/> > >> University of Oxford, Tel: +44 1865 272861 (self) > >> 1 South Parks Road, +44 1865 272866 (PA) > >> Oxford OX1 3TG, UK Fax: +44 1865 272595 > >> > >> ______________________________________________ > >> R-devel@... mailing list > >> https://stat.ethz.ch/mailman/listinfo/r-devel > >> > > > > -- > Brian D. Ripley, ripley@... > Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/<http://www.stats.ox.ac.uk/%7Eripley/> > University of Oxford, Tel: +44 1865 272861 (self) > 1 South Parks Road, +44 1865 272866 (PA) > Oxford OX1 3TG, UK Fax: +44 1865 272595 > [[alternative HTML version deleted]] ______________________________________________ R-devel@... mailing list https://stat.ethz.ch/mailman/listinfo/r-devel |
|
|
Re: New version of X11, png and jpegOn Tue, Feb 26, 2008 at 8:18 AM, Prof Brian Ripley <ripley@...>
wrote: > Revision r44621 supports (in a limited way) cairo 1.0 and hence I believe > vanilla FC5 -- I found what purports to be a vanilla FC5 box and it works > quite well there. > > Two people have reported that the svg(), cairo-pdf() and cairo-ps() > devices produce blank (but not empty) files. I was able to confirm that > on Debian etch (cairo 1.2.4). They do work on cairo 1.4.14 (F8) and > better on a 1.5.10 snapshot. > My intuition is that there is a missing call to cairo_show_page(). I believe this became unnecessary in the 1.4.x series. This should probably be called any time there is new page (after the first) and when the device is closed. > We've got a working version on Mac OS X, but you need to install cairo. > > Finally, the quality of the fonts you see will depend on what fonts you > have installed: if you only have X11 bitmapped fonts, that is what you > will get (and I am getting on our minimally configured Debian etch > machine). Our Fedora installations are mainly using the URW Type 1 fonts > in the urw-fonts RPM. One of the alternatives is RH's liberation fonts > (https://www.redhat.com/promo/fonts/). > > On Mon, 25 Feb 2008, Prof Brian Ripley wrote: > > > That call is from Cairo 1.2, so looks like our test FC5 box had a later > > version of the cairo libraries than the one pkg-config reported. > > > > You should be able to build with --without-cairo until such a time as we > can > > add a suitable configure test. > > > > Thank you for the report. > > > > On Mon, 25 Feb 2008, Roger Peng wrote: > > > >> (Apologies, I meant to 'Reply to all' the first time but forgot). > >> > >> I built r44608 of R-devel with (I think) cairo support. At least, > >> that's what the configure script told me. In addition, > >> 'capabilities("cairo")' is TRUE. Calling X11(type = "Cairo") gives me > >> the error: > >> > >> Error in X11() : X11 module cannot be loaded > >> In addition: Warning message: > >> In X11() : > >> unable to load shared library > >> '/home/rpeng/install/R-devel/lib64/R/modules//R_X11.so': > >> /home/rpeng/install/R-devel/lib64/R/modules//R_X11.so: undefined > >> symbol: cairo_image_surface_get_data > >> > >> > >> I figured I must be missing a library somewhere, but I'm not sure how > >> to track down which one. Any thoughts here? > >> > >> I'm on a FC5 system with: > >> > >> cairo-devel-1.0.4-1 > >> cairo-1.0.4-1 > >> cairo-1.0.4-1 > >> > >> and > >> > >> pango-1.12.4-4 > >> pango-devel-1.12.4-4 > >> pango-1.12.4-4 > >> > >> Also, I have > >> > >> [rpeng@audrey R-source]$ pkg-config --modversion pango > >> 1.12.4 > >> [rpeng@audrey R-source]$ pkg-config --modversion cairo > >> 1.0.4 > >> > >> -roger > >> > >> On Mon, Feb 25, 2008 at 11:56 AM, Prof Brian Ripley > >> <ripley@...> wrote: > >>> R-devel has new versions of the X11(), png() and jpeg() devices on > >>> Unix-alikes. The intention is that these are used identically to the > >>> previous versions (which remain available) but will produce > >>> higher-quality > >>> output with more features. > >>> > >>> Pros: > >>> > >>> Antialiasing of text and lines (can be turned off) but no blurring of > >>> fills. > >>> > >>> Buffering of the X11 display and fast repainting from a backing > image. > >>> (The intention is to emulate the timer-based buffering of the > windows() > >>> device in due course, but not for 2.7.0.) > >>> > >>> Ability to use translucent colours, including backgrounds, and > produce > >>> partially transparent PNG files. > >>> > >>> Scalable text, including to sizes like 4.5 pt. This allows more > accurate > >>> sizing on non-standard screen sizes (e.g. my home machine has a 90dpi > >>> 1650x1024 display whereas standard X11 fonts are set up for 75 or 100 > >>> dpi). > >>> > >>> Full support for UTF-8, so on systems with suitable fonts you can > plot in > >>> many languages on a single figure (and this will work even in > non-UTF-8 > >>> locales). The output should be locale-independent (unlike the > current > >>> devices where even English text is rendered slightly differently in > >>> Latin-1 and UTF-8 locales). > >>> > >>> A utility function savePlot() to make a PNG/JPEG/TIFF copy of the > current > >>> plot. > >>> > >>> The new png() and jpeg() devices do not require an X server to be > >>> running. > >>> > >>> Cons: > >>> > >>> Needs more software installed - cairo, pango and support packages > (which > >>> on all the systems we have looked at are pulled in by the packages > >>> checked > >>> for). You will see something like > >>> > >>> Additional capabilities: PNG, JPEG, iconv, MBCS, NLS, cairo > >>> ^^^^^ > >>> if configure finds the software we are looking for. > >>> > >>> Slower under some circumstances (although on the test systems much > faster > >>> than packages Cairo and cairoDevice). This will be particularly true > for > >>> X11() with a slow connection between the machine running R and the X > >>> server. > >>> > >>> The additional software might not work correctly. > >>> > >>> > >>> The new versions are not currently the default, but can be made so by > >>> setting X11.options(type="Cairo"), e.g. as a load hook for package > >>> grDevices. I am using > >>> > >>> setHook(packageEvent("grDevices", "onLoad"), > >>> function(...) { > >>> grDevices::ps.options(horizontal=FALSE) > >>> if(getRversion() >= '2.7.0') grDevices::X11.options > (type="Cairo") > >>> }) > >>> > >>> > >>> Please try these out and let us know how you get on. As a check, try > the > >>> TestChars() examples in ?points - on one Solaris 10 system a few of > the > >>> symbol font characters were incorrect. It worked on an FC5 system > with > >>> > >>> auk% pkg-config --modversion pango > >>> 1.12.4 > >>> auk% pkg-config --modversion cairo > >>> 1.0.4 > >>> > >>> so the versions required are not all recent. > >>> > >>> Although these devices would in principle work on Mac OS X, neither > cairo > >>> nor pango is readily available. We are working on other versions for > >>> Mac OS (X11 based on cairo/freetype, png/jpeg based on Quartz). > >>> > >>> There are also new svg() and tiff() devices. > >>> > >>> -- > >>> Brian D. Ripley, ripley@... > >>> Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/<http://www.stats.ox.ac.uk/%7Eripley/> > >>> University of Oxford, Tel: +44 1865 272861 (self) > >>> 1 South Parks Road, +44 1865 272866 (PA) > >>> Oxford OX1 3TG, UK Fax: +44 1865 272595 > >>> > >>> ______________________________________________ > >>> R-devel@... mailing list > >>> https://stat.ethz.ch/mailman/listinfo/r-devel > >>> > >> > >> > >> > >> -- > >> Roger D. Peng | http://www.biostat.jhsph.edu/~rpeng/<http://www.biostat.jhsph.edu/%7Erpeng/> > >> > > > > -- > > Brian D. Ripley, ripley@... > > Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/<http://www.stats.ox.ac.uk/%7Eripley/> > > University of Oxford, Tel: +44 1865 272861 (self) > > 1 South Parks Road, +44 1865 272866 (PA) > > Oxford OX1 3TG, UK Fax: +44 1865 272595 > > > > -- > Brian D. Ripley, ripley@... > Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/<http://www.stats.ox.ac.uk/%7Eripley/> > University of Oxford, Tel: +44 1865 272861 (self) > 1 South Parks Road, +44 1865 272866 (PA) > Oxford OX1 3TG, UK Fax: +44 1865 272595 > > ______________________________________________ > R-devel@... mailing list > https://stat.ethz.ch/mailman/listinfo/r-devel > [[alternative HTML version deleted]] ______________________________________________ R-devel@... mailing list https://stat.ethz.ch/mailman/listinfo/r-devel |
|
|
Re: New version of X11, png and jpegOn Tue, 26 Feb 2008, Michael Lawrence wrote:
> On Tue, Feb 26, 2008 at 8:18 AM, Prof Brian Ripley <ripley@...> > wrote: > >> Revision r44621 supports (in a limited way) cairo 1.0 and hence I believe >> vanilla FC5 -- I found what purports to be a vanilla FC5 box and it works >> quite well there. >> >> Two people have reported that the svg(), cairo-pdf() and cairo-ps() >> devices produce blank (but not empty) files. I was able to confirm that >> on Debian etch (cairo 1.2.4). They do work on cairo 1.4.14 (F8) and >> better on a 1.5.10 snapshot. >> > > My intuition is that there is a missing call to cairo_show_page(). I believe > this became unnecessary in the 1.4.x series. This should probably be called > any time there is new page (after the first) and when the device is closed. Yes, you are quite right (and of course the 1.5.x docs I was reading didn't say it was needed). Unfortunately, that only defers the problems as fonts are not handled correctly in 1.2.x, at least on my test machine. -- Brian D. Ripley, ripley@... Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UK Fax: +44 1865 272595 ______________________________________________ R-devel@... mailing list https://stat.ethz.ch/mailman/listinfo/r-devel |
|
|
Re: New version of X11, png and jpegThe now default Cairo results in much prettier graphs, but dense graphs such as plot(rnorm(1e4)) take considerably longer to plot than using X11(type="Xlib"). This has already been mentioned, but I was wondering if we users could expect Cairo speed increases in the near future?
>Slower under some circumstances (although on the test systems much faster than packages Cairo and cairoDevice). This will be particularly true for X11() with a slow connection between the machine running R and the X server. Using R 2.7.0 on Ubuntu 8.04 (Pentium 4 1.70 GHz on one machine and Centrino Duo on another) |
|
|
Re: New version of X11, png and jpegOn Wed, Apr 30, 2008 at 10:26 AM, Maarten Blaauw <drieteenmeeuw@...>
wrote: > > The now default Cairo results in much prettier graphs, but dense graphs > such > as plot(rnorm(1e4)) take considerably longer to plot than using > X11(type="Xlib"). This has already been mentioned, but I was wondering if > we > users could expect Cairo speed increases in the near future? > I'm skeptical that the base performance of the Cairo library will improve much, but there has long been talk of a hardware-accelerated backend. Most recently, someone came up with one based on OpenVG (and its ShivaVG implementation using OpenGL and C). It's a long way from being part of base Cairo (or even released on its own). Of course, it would really help to optimize at a higher level (e.g. use caching to avoid re-rendering the same glyph thousands of times). I've also thought about using a vector-based API directly on top of OpenGL, like what Qt (and now the clutter project) has, but that's getting off-topic. > > >Slower under some circumstances (although on the test systems much faster > than packages Cairo and cairoDevice). This will be particularly true for > X11() with a slow connection between the machine running R and the X > server. > > Using R 2.7.0 on Ubuntu 8.04 (Pentium 4 1.70 GHz on one machine and > Centrino > Duo on another) > -- > View this message in context: > http://www.nabble.com/New-version-of-X11%2C-png-and-jpeg-tp15672580p16987759.html > Sent from the R devel mailing list archive at Nabble.com. > > ______________________________________________ > R-devel@... mailing list > https://stat.ethz.ch/mailman/listinfo/r-devel > [[alternative HTML version deleted]] ______________________________________________ R-devel@... mailing list https://stat.ethz.ch/mailman/listinfo/r-devel |
|
|
Re: New version of X11, png and jpegOn Wed, 30 Apr 2008, Maarten Blaauw wrote:
> > The now default Cairo results in much prettier graphs, but dense graphs such > as plot(rnorm(1e4)) take considerably longer to plot than using > X11(type="Xlib"). This has already been mentioned, but I was wondering if we > users could expect Cairo speed increases in the near future? Some. As Michael Lawrence has already said, cairo speed is an issue and unlilkely to improve any time soon. And anti-aliasing takes some CPU time. What we can do is to reduce the information passing between R and the X server. I already have timer-based double buffering running (the same scheme as on Windows), and that helps a lot in the circumstances mentioned (lots of small symbols). There are some event-loop-interface issues to sort out before it get committed to R-devel. type="nbcairo" is likely to be faster in your example, but not as fast as the buffered device planned for 2.8.0. The X11 server does make quite a difference -- I am running fairly decent Nvidia cards with the Nvidia X server module, and that has much higher performance than the vanilla one that Fedora ships. In the end the reason we offer a choice of types is that there are different needs on the quality vs speed axis. >> Slower under some circumstances (although on the test systems much faster > than packages Cairo and cairoDevice). This will be particularly true for > X11() with a slow connection between the machine running R and the X server. > > Using R 2.7.0 on Ubuntu 8.04 (Pentium 4 1.70 GHz on one machine and Centrino > Duo on another) > -- > View this message in context: http://www.nabble.com/New-version-of-X11%2C-png-and-jpeg-tp15672580p16987759.html > Sent from the R devel mailing list archive at Nabble.com. > > ______________________________________________ > R-devel@... mailing list > https://stat.ethz.ch/mailman/listinfo/r-devel > -- Brian D. Ripley, ripley@... Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UK Fax: +44 1865 272595 ______________________________________________ R-devel@... mailing list https://stat.ethz.ch/mailman/listinfo/r-devel |
| Free embeddable forum powered by Nabble | Forum Help |