[R] Invisible plot using RSvgDevice

Prof Brian Ripley ripley at stats.ox.ac.uk
Mon Jan 10 13:13:44 CET 2005


Have you contacted the author?

The conventions for R graphics devices changed in R 2.0.0, in particular 
the way the alpha channel is represented.  I doubt if the same version of 
a graphics device works in both R < 2.0.0 and R >= 2.0.0, and this one 
appears to predate R 2.0.0.

On Mon, 10 Jan 2005, Jan Hummel wrote:

> Dear list members,
>
> I have a probably simple question concerning the RSvgDevice. After upgrading from R 1.9.0 to R 2.0.1 the computet svg files looking empty.
> Each time the RSvgDevice 0.5.3 were used.
>
> Scales and headers are printed but the plots are missing:
> <rect x="433.10" y="246.13" width="0.93" height="29.74" style="stroke-width:1;stroke:none;fill:none"/>
> <rect x="434.02" y="201.52" width="0.93" height="74.35" style="stroke-width:1;stroke:none;fill:none"/>
> <rect x="434.95" y="201.52" width="0.93" height="74.35" style="stroke-width:1;stroke:none;fill:none"/>
>
> before updating the svg looked like that:
> <rect x="431.61" y="251.09" width="1.12" height="24.78" style="stroke-width:1;stroke:#000000;fill:#32CD32" />
> <rect x="432.72" y="261.00" width="1.12" height="14.87" style="stroke-width:1;stroke:#000000;fill:#32CD32" />
> <rect x="433.84" y="256.04" width="1.12" height="19.83" style="stroke-width:1;stroke:#000000;fill:#32CD32" />
>
> So it seems to be the "stroke:none;fill:none" text which will let the plot be "invisible"?
>
> I use following code:
> devSVG( file=filename, height = plot_height, width = plot_width, xmlHeader=TRUE, onefile=TRUE)
> plot1<-barplot(MI, col=c('limegreen'), beside=TRUE, width = c(1,1), space = c(0,1), ylab='mutual inf.', ylim=c(0,1), main=headertext)
> ...
> dev.off()
>
> I definitly changed no code, but the plot is invisible.
>
> Any help would be appreciated!
>
> Thanks for any help.
>
> 	Jan
>
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
>

-- 
Brian D. Ripley,                  ripley at stats.ox.ac.uk
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




More information about the R-help mailing list