Displaying 20 results from an estimated 800 matches similar to: "strange behaviour of CairoPNG"
2009 Jun 05
1
Antialiasing plots and text on different devices
I have a question about antialiasing when R generates bitmaps. (This follows
a thread on the ggplot2 mailing list.)
I mostly use R on Linux, although I sometimes use it in Mac and Windows as
well. On Linux, I've found that plotting shapes 15-18 via cairo results in
bad-looking output. The points are not antialiased, and they are jagged and
misshapen. Plots generated in Windows also aren't
2013 Oct 21
2
png(type='cairo'): point symbols without boarders are not anti-aliased?
Hi,
It seems that anti-aliasing in png(type = 'cairo') is not well
supported for the point symbols without boarders, e.g. pch = 16. The
Cairo package works well, though. You can compare png() with
CairoPNG():
png(): http://i.imgur.com/8niB3jX.png
CairoPNG(): http://i.imgur.com/FZBJOxm.png
f = function(dev, ..., main = '') {
dev(...)
plot(c(1, 2, 1, 2), c(1, 1, 2, 2),
2008 Apr 08
1
Legend on plots when using Cairo
Dear all,
I am trying to use the Cairo package to avoid some X11 issues and it
works very well. However, when I want to add a legend to my plots, I
receive an error message from Cairo:
> library(Cairo)
> CairoPNG(file="test.png")
> plot(1:100)
> dev.off()
null device
1
This works fine. But:
> CairoPNG(file="test.png")
> plot(1:100)
>
2011 Feb 15
1
Cairo device won't output the PNG
Hi All,
I have been experiencing a strange issue ever since I upgraded my R and the packages. I cannot plot anything to the CairoPNG device.For an example:> Cairo(600, 600, file="plot.png", type="png", bg="white")> plot(1:10)> dev.off()will create an empty plot.png file. I am running R 2.12.1 (32bit) on Windows 7 (64bit).
----------------------------->
2009 Oct 22
1
Cairo package, png files within for loop are black?
Hello,
I am generating .png images using the Cairo package in a for loop
(looping on the number of zones, number of zones equals the number of
plots to create based on different zone data). When I run the R
script the .png files are created but they are all black? If I comment
out the for loop and force my zones to equal one the png file is created
correctly? Is there an issue with
2010 Jan 20
2
Plot frame border to start at zero?
Hello,
I am creating plots of hourly precipitation and accumulated
precipitation (on different axis, see attached image). I was wondering
how can I have the plot frame (black border) start at zero, it looks
like it is plotted less than zero?
The code I use to create the png files is below:
CairoPNG(PNG_file,width=1000, height=600, pointsize=14, bg="white")
opar <-
2007 Sep 27
1
Cairo on windows
Hi All,
I just installed Cairo on R 2.5.1 on windows XP. My hope was to get to see
the transparency output e.g. http://had.co.nz/ggplot2/stat_smooth.html
ggplot2 - stat_smooth , which I finally managed to do. However, I find the
Cairo device, which I access either through CairoWin() or Cairo(type="win"),
is pretty shaky in a number of respects :
- whatever portion of the Cairo
2009 Jul 03
1
Plot Fonts in Windows vs Mac OSX
I have been plotting the same charts using png on a Windows machine
and on a Mac OSX and the quality of the resulting images, particularly
in relation to the fonts, look far superior in the plots produced on
the Mac. Is there any way I can enhance the quality of the plots
produced on the Windows machine? I have also tried using win.metafile
on the Windows machine and the quality looks the same as
2012 Jan 19
0
png output on a server?
I've got R running on a gentoo server that doesn't have X11 installed. Its
a custom build to keep those dependencies at bay! However, some of my
scripts use the base png() function and ggplot2. But, png uses X11.
A google search suggests using the Cairo package, which works... but
changes the fonts (specifically the size of the font). Adjusting the
pointsize doesn't seem to have
2009 Apr 17
0
Margins in lattice and device resolution
Hi all,
I believe I've run into this before, but I seem to have totally
forgotten. No headway in the last couple of hours either. How do I
make sure that points and margins remain the same absolute size as I
change
the resolution of a device?
(I'm running 2.9.1 patched, on a Win XP-machine)
Many thanks in advance,
Gustaf
Ps: As an afterthought, might it be that this behaviour is
2009 Mar 28
7
unicode only works with a second one
I'd like to paste a zodiac sign on a graph, but it only prints it when
I add another unicode ( \u3030) to the desired \u2648 - why?
See the examplecode (compare the orange with the skyblue):
plot(c(-1,1),c(-4,-2),type="n")
text(x=0,y=-3.0,labels="\u2648 \u3030",cex=2.3,col="skyblue")
text(x=0,y=-3.2,labels="\u2648",cex=2.3,col="orange")
2006 Feb 08
3
print formula on plot
I estimate some parameters and I want to print them (pretty) on my plot:
# somehow estimated parameters
z<-c(1.543523e+00, 1.23453e+00, 3.454000e+00)
x<-seq(-1,1,length=100)
plot(x,z[3]*x^2+z[2]*x+z[3],type="l", main="My nice plot of the
estimated function")
zs<-format(z,digits=4,scientific=FALSE,trim=TRUE)
text(-0.9,7,expression(1.54*x^2)) # is
2013 Jun 20
0
Produce HTML reference in knitr using rmd
Hello guys,
I'm new to knitr and to R in general. I'm using RStudio and knitr, both the
latest version.
I am trying to produce an html page with multiple graph, which has a url
reference to each of them that bring us lower on the page. For those produce
separately it is pretty easy, since I just include the html location like I
did for graph 1.
But in a loop, I am struggling to
2013 Jan 10
0
asCairoDevice issue
Hi All,
I found this issue when using asCairoDevice to transforming splom scatter plot to my RGtk2 GUI:
If I put the code in R GUI or using CairoPNG or Cairo_pdf() to draw the scatter plot, I can get it correctly:
The codes are: (you can copy and paste to your R GUI)
super.sym <- trellis.par.get("superpose.symbol")
plot.call<-splom(~iris[1:4], groups = Species, data = iris,
2009 Nov 29
1
Roman numerical output
I have integers and I want R to give them back/output as Roman numerals:
s=c(7,17)
format(s,roman=T)
is obviously wrong. Is there any other way/function to do this?
Thanks,
Thomas
2006 Oct 01
1
pie() with only 180°
I want to plot the results of today's elections in Austria in this
typical 180?-piechart (and not 360?).
Unfortunantely pie() has just an argument "init.angle" and no "end.angle".
Perhaps you know a workaround.
Thomas
2008 Oct 16
1
draw a 5cm x 3cm rectangle
Hi I want to draw sth in a pdf file with a predefined defined size.
Say a 5cm x 3cm rectangle (a ruler):
pdf("rect.pdf", paper="a4")
plot(c(1,5,5,1,1),c(1,1,3,3,1),asp=1,axes="n")
dev.off()
but how do I fix that one unit is 1cm?
Thanks
thomas
2009 Aug 02
1
package to convert coordiantes to timezone
Is there a R-package with a function that returns me the timezone, if
I hand over longitude and latitude?
I know online services like
http://ws.geonames.org/timezone?lat=-38.01&lng=147 and
http://www.earthtools.org/webservices.htm#timezone and wodner if this
exists for R too.
Thanks for helping,
thomas
2007 Mar 02
2
plot with fixed axis proportion
I want to plot something (eg a circle) with a fixed ratio of the x and
y axis, or (even better) with a fixed size when I print it. Output
should then be a circle (actually it'll be someting more complicated)
with radius 5cm and not an ellipse.
I'm _sure_ this is not new, but after looking 45min for a solution, I
post here...
Thanks for help
Thomas
2008 Mar 10
3
internet proxy settings (win)
I cannot access internet through R.
My IT-guys told me that I should set the proxy and the port and then
everything will be fine. Where can I set them?
I use R 2.6.2 under Windows 2000 and these settings are those of the
Internet Explorer (no password).
I read http://cran.at.r-project.org/bin/windows/base/rw-FAQ.html#The-Internet-download-functions-fail_002e
but staring R by
"C:\Program