search for: cairopng

Displaying 16 results from an estimated 16 matches for "cairopng".

2009 Jun 05
1
Antialiasing plots and text on different devices
...ed PNG's of the chart on Mac, Linux, and Windows, using png() and setting "type" to Xlib, cairo, quartz, if available on the given platform. In Windows, I did it without the type argument (in Windows, the flag wasn't available). Finally, I also installed the Cairo package and used CairoPNG. Please note the distinction between "cairo", which is built-in, and "Cairo", which is an installed package. (Side note: there's no Mac-Xlib image, but only because I had some X server issues on that computer.) Here are some observations and questions that hopefully someon...
2010 Jun 04
1
strange behaviour of CairoPNG
Hi, could it be that the text() fuction gives different output for normal png() and CarioPNG()? See the following example and the attached images: the font=2 and font=3 seem to be exchanged! Thanks for help, Thomas CairoPNG("Test-cairo.png",width=750,height=690) #png("Test-normal.png",width=750,height=690) plot(1,1,type="n",main="normal") text(1,1,"normal",adj=c(1,1)) text(1,1,"bold",font=2,adj=c(-1,-1)) text(1,1,"italic",font=3,adj=c(1,-1)) text(1...
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), pch=c(16, 19), cex=c(2, 2, 15, 15), xlim=c(0.5, 2.5), ylim=c(0.5, 3), main = deparse(substitute(dev))) dev.off()...
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) > legend(50,50,"test") Error in strwidth(legend, units = "user", cex = cex) : font 2147483647 not recogni...
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
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 <- par(mai = c(.8, .8, 1, .8)) # Set margins plot(ppt,type="h",col="dark grey",ylim=c(0,max_ppt+1), lwd=6, xlab='', ylab='', main=title, frame.plot=T, axes=F)...
2009 Apr 17
0
Margins in lattice and device resolution
...on a Win XP-machine) Many thanks in advance, Gustaf Ps: As an afterthought, might it be that this behaviour is related to the receng grid-bug for text size in lattice when changing resolution? ---- Example: ..... ###This give a totally squished graph, where the actual plotting area is minimal CairoPNG("example.png",width = 480, height = 480, dpi=600, pointsize = 12, bg = "white") bwplot(decrease ~ treatment, OrchardSprays, groups = rowpos, panel = "panel.superpose", panel.groups = "panel.linejoin", xlab = "treatm...
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). -----------------------------> sessionInfo()R version 2.12.1 (2010...
2012 Jan 19
0
png output on a server?
...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 much effect. Aside from tuning the CairoPNG function to make my graphs look right, has anyone found a good way to avoid the X11 dependency but still use the base png function? If anyone has experience with CairoPNG and making it look like the base png function, id love to hear what you've learned! Thanks, Justin > capabilities()...
2009 Oct 22
1
Cairo package, png files within for loop are black?
...ent 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 generating .png files within a for loop? Create .png commands within for loop: CairoPNG(paste(t.g), width=800, height=600, pointsize=12, bg="white") xyplot(areasqmi ~ value, x.p, groups=dur, main=(t.n), ylab=expression("Area(mi" ^ 2 * ")"), xlab="Maximum Average Depth of Percipitation (inches)", scales=list(y=list(log=TRUE)), yli...
2007 Sep 27
1
Cairo on windows
...n reverting back to a simple plotting command that worked 5 seconds ago won't bring back the display. One has to dev.off() and start again. Besides the interactive windows display, I also wanted to use Cairo's PNG support so I went and tried one of my png(filename = ...) commands with CairoPNG(filename = ...) and the output was also blank. Are there additional steps besides a package install of Cairo I have to worry about ? TIA, Yves Moisan -- View this message in context: http://www.nabble.com/Cairo-on-windows-tf4529124.html#a12923700 Sent from the R help mailing list archive at N...
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, panel = panel.superpose, key = list(title...
2013 Jun 20
0
Produce HTML reference in knitr using rmd
...<p style="font-size:16px; text-align:center"> Lightpt <#location1> Lightb <#location2> LightbT <#location3> Graph 4 <#location4> </p> graph 1 ```{r, include=FALSE} plot <- function(cCode, model = "y", years = 3) { CairoPNG(paste(cCode, ".png", sep = ""), width=600, wheigth=675) lapply(1:ncol(pcmat), function(x) { ... }) dev.off()} ``` Thank you for your time, Alex -- View this message in context: http://r.789695.n4.nabble.com/Produce-HTML-reference-in...
2010 Jan 28
1
quartz() and dpi
Hello all, I am using quartz (on OS X obviously) to produce PDFs and PNGs from my plots, for later inclusion in LaTeX. I am typically using something like: plot(0) dev.print(quartz, file="foo.pdf", width=5, height=3) dev.print(quartz, file="foo.png", width=5, height=3, dpi=72) I want the sizes of the PDF and PNG to be *equal* in *inches*, which works with dpi=72. However,
2013 Apr 05
1
parallel: Race-condition concern regarding graphics devices in a multi-thread environment
Hi, I'm trying to figure out how to safely make sure that I close the same graphics device that I opened earlier in a thread (and not one opened by a parallel thread). In a *single-thread* environment, one can do the following to open and close a device: makePlot <- function(i) { filename <- sprintf("foo%d.png", i); png(filename); idx <- dev.cur();
2008 Feb 19
1
Bug using X11 on mac osx (for jpeg or png creation) (PR#10800)
Full_Name: Stephane Bonneaud Version: 2.6.2 OS: OSX - Leopard 10.5.2 Submission from: (NULL) (195.221.233.130) Hello, I have a R code file containing the following code: ------- # This code is in r2jpg.r # myData is filled here with some data from a file jpeg(filename="test.jpg",width=960,height=720,pointsize=16,quality=100) plot(myData,xlab="anything",