|
View:
New views
8 Messages
—
Rating Filter:
Alert me
|
|
|
Cairo on windowsHi 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. 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 device that is covered by the R command window does not get drawn. I noticed changing the size of the Cairo window by dragging one of its corners with the mouse does refresh the whole window sometimes
- a simple plot or qplot command works, e.g. qplot(x=kg.hab,y=Cout.ton, data=ech2). When one starts to add xlab, ylab and main then things start getting shaky to the point the display becomes blank. At that point, even 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 |
|
|
Re: Cairo on windowsYou could also try the cairoDevice package, which should definitely
work with the gtk libraries that you probably have from installing GGobi. Hadley On 9/27/07, Yves Moisan <ymoisan@...> wrote: > > 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 device that is covered by the R command > window does not get drawn. I noticed changing the size of the Cairo window > by dragging one of its corners with the mouse does refresh the whole window > sometimes > > - a simple plot or qplot command works, e.g. qplot(x=kg.hab,y=Cout.ton, > data=ech2). When one starts to add xlab, ylab and main then things start > getting shaky to the point the display becomes blank. At that point, even > 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 Nabble.com. > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help@... mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. > -- http://had.co.nz/ ______________________________________________ R-help@... mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. |
|
|
Re: Cairo on windows> You could also try the cairoDevice package, which should definitely
> work with the gtk libraries that you probably have from installing > GGobi. Hi Hadley, I tried that also before posting on R-help : > library(cairoDevice) Error in dyn.load(x, as.logical(local), as.logical(now)) : impossible de charger la bibliothèque partagée 'C:/PROGRA~1/R/R-25~1.1/library/cairoDevice/libs/cairoDevice.dll': LoadLibrary failure: La procédure spécifiée est introuvable. Erreur : le chargement du package / espace de noms a échoué pour 'cairoDevice' Translation : impossible to load shared library 'C:/PROGRA~1/R/R-25~1.1/library/cairoDevice/libs/cairoDevice.dll' The library *is* at C:/Program Files/R/R-2.5.1/library/cairoDevice/libs so I'm wondering if the path mentioned in the error log is where 'library' is looking or if that path gets expanded (e.g. "PROGRA~1" becomes "Program Files"). I looked at library to see if I can supply it with a hard path where to find the dll but playing with libpath and lib.loc won't help. Is that a matter of Cairo and cairoDevice not installing properly on Windows ? TIA, Yves ______________________________________________ R-help@... mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. |
|
|
Re: Cairo on windowsOn Thu, 27 Sep 2007, Moisan Yves wrote:
>> You could also try the cairoDevice package, which should definitely >> work with the gtk libraries that you probably have from installing >> GGobi. > > Hi Hadley, > > I tried that also before posting on R-help : > >> library(cairoDevice) > Error in dyn.load(x, as.logical(local), as.logical(now)) : > impossible de charger la bibliothèque partagée 'C:/PROGRA~1/R/R-25~1.1/library/cairoDevice/libs/cairoDevice.dll': > LoadLibrary failure: La procédure spécifiée est introuvable. > > > Erreur : le chargement du package / espace de noms a échoué pour > 'cairoDevice' > > Translation : impossible to load shared library > 'C:/PROGRA~1/R/R-25~1.1/library/cairoDevice/libs/cairoDevice.dll' > > The library *is* at C:/Program Files/R/R-2.5.1/library/cairoDevice/libs > so I'm wondering if the path mentioned in the error log is where > 'library' is looking or if that path gets expanded (e.g. "PROGRA~1" > becomes "Program Files"). I looked at library to see if I can supply it > with a hard path where to find the dll but playing with libpath and > lib.loc won't help. Is that a matter of Cairo and cairoDevice not > installing properly on Windows ? it. That usually means that a dependent DLL is not on the path or not recent enough, and under XP you usually get a message box to that effect (Vista 64 seems to tell you a lot less by default). Now, Cairo ships with libcairo-2.dll but does not put it on the path, whereas cairoDevice needs more, including libpango and libpangocairo. So you will need to install a Windows version of Gtk+ and make sure it is in your path. I have a feeling I needed a later version than I was using for GGobi (I have 2.10.11-1). My experience is that cairoDevice is a lot slower than Cairo, especially on Windows, and about equally flaky. If you see how many layers are involved with Cairo on Windows you will not be surprised. If all you need is semi-transparency support I suggest you try R 2.6.0 RC which supports it in the windows() device. -- 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-help@... mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. |
|
|
Re: Cairo on windows> My experience is that cairoDevice is a lot slower than Cairo,
especially on Windows, and about equally flaky. If you see how many layers are involved with Cairo on Windows you will not be surprised. Actually, I ended up trying to load deviceCairo simply because it was the only other package with the string "Cairo" in it besides "Cairo" itself ;-). I suspected some interaction between the two libraries (deviceCairo and Cairo) so that's why I tried to load it hoping it would solve the flakiness of the CairoWin display. > If all you need is semi-transparency support I suggest you try R 2.6.0 RC which supports it in the windows() device. Thanx for the tip. Yves Moisan ______________________________________________ R-help@... mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. |
|
|
Re: Cairo on windowsOn 9/27/2007 1:11 PM, Moisan Yves wrote:
>> You could also try the cairoDevice package, which should definitely >> work with the gtk libraries that you probably have from installing >> GGobi. > > Hi Hadley, > > I tried that also before posting on R-help : > >> library(cairoDevice) > Error in dyn.load(x, as.logical(local), as.logical(now)) : > impossible de charger la bibliothèque partagée 'C:/PROGRA~1/R/R-25~1.1/library/cairoDevice/libs/cairoDevice.dll': > LoadLibrary failure: La procédure spécifiée est introuvable. > > > Erreur : le chargement du package / espace de noms a échoué pour 'cairoDevice' > > Translation : impossible to load shared library 'C:/PROGRA~1/R/R-25~1.1/library/cairoDevice/libs/cairoDevice.dll' > > The library *is* at C:/Program Files/R/R-2.5.1/library/cairoDevice/libs so I'm wondering if the path mentioned in the error log is where 'library' is looking or if that path gets expanded (e.g. "PROGRA~1" becomes "Program Files"). I looked at library to see if I can supply it with a hard path where to find the dll but playing with libpath and lib.loc won't help. Is that a matter of Cairo and cairoDevice not installing properly on Windows ? Don't you also get a popup, telling you that libgdk-win32-2.0-0.dll was not found? I get that; I assume it's supposed to come from gtk, which I don't currently have installed. It's unfortunate that the error message isn't more informative about what the real problem is. I'll see if there's a way to improve it. The dll also requires imports from libpangocairo-1.0-0.dll libpango-1.0-0.dll libgtk-win32-2.0-0.dll libgobject-2.0-0.dll libglib-2.0-0.dll libcairo-2.dll R.dll The last one is present on my system; I don't know if the others are all in gtk. Duncan Murdoch ______________________________________________ R-help@... mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. |
|
|
Re: Cairo on windows> Don't you also get a popup, telling you that libgdk-win32-2.0-0.dll
was not found? Duncan, No such popup. > The dll also requires imports from > libpangocairo-1.0-0.dll > libpango-1.0-0.dll > libgtk-win32-2.0-0.dll > libgobject-2.0-0.dll > libglib-2.0-0.dll > libcairo-2.dll I checked that all of the above are on C:\GTK\bin > R.dll That's on C:\Program Files\R\R-2.5.1\bin. My system path has "%GTK_BASEPATH%\bin" as its very first argument, so I gather I have everything I need ?? I tried adding explicitly C:\GTK\bin on the path. I'll see where that leads me next time I fire up R. Thanx, Yves Moisan ______________________________________________ R-help@... mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. |
|
|
Re: Cairo on windowsOn 9/27/07, Moisan Yves <ymoisan@...> wrote:
> > > My experience is that cairoDevice is a lot slower than Cairo, > especially > on Windows, and about equally flaky. If you see how many layers are > involved with Cairo on Windows you will not be surprised. > > Actually, I ended up trying to load deviceCairo simply because it was > the only other package with the string "Cairo" in it besides "Cairo" > itself ;-). I suspected some interaction between the two libraries > (deviceCairo and Cairo) so that's why I tried to load it hoping it would > solve the flakiness of the CairoWin display. My guess is the problem is due to an older version of GTK+. Although cairoDevice only requires GTK+ 2.8.x (which is probably what you have installed), the Windows binary of cairoDevice on CRAN is probably built against GTK+ 2.10.x, just like RGtk2. I've added a feature to cairoDevice and RGtk2 recently that will automatically try to install the latest binary of GTK+ on Mac and Windows when loading the library fails. That said, I'd really like to merge cairoDevice (specifically the RGtk2-embedding feature) with the Cairo package. Having one less package to maintain would be nice. > If all you need is semi-transparency support I suggest you try R 2.6.0 > RC > which supports it in the windows() device. > > Thanx for the tip. > > Yves Moisan > > ______________________________________________ > R-help@... mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide > http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. > [[alternative HTML version deleted]] ______________________________________________ R-help@... mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. |
| Free embeddable forum powered by Nabble | Forum Help |