cairo

Pango-WARNING **: failed to choose a font, expect ugly output

我的未来我决定 提交于 2019-11-30 21:47:12
问题 I'm getting this error when starting anything that uses the Pango library. I'm using Kubuntu 9.10. I've done 'sudo apt-get --reinstall install' on libgtk* libcairo* libpango* and fontconfig, with no luck. Could someone point me in the right direction? Thanks. 回答1: I did a lot of searching on this and never found a decent answer. My issue involved running virt-manager (an xwindows based utility) on a remote server. I have all the fonts on my xwindows box but not on the remote host. the i ran

How do I prevent Rplots.pdf from being generated?

孤街浪徒 提交于 2019-11-30 17:14:42
I am working with some R code that generates a number of images as png files; however, a Rplots.pdf file keeps on being generated in the working directory, is there a way to prevent this from happening? library(Cairo) CairoPNG(file = "graphs.png") nf <- layout(matrix(c(1:8), 2, 4, byrow=T), c(1, 1), c(1, 1, 1, 1), TRUE) for (k in 1:num.k) { plotMatrix(connect.matrix.ordered[k,,], log = F, main = paste("k=", k.vector[k]), sub = paste("Cophenetic coef.=", rho[k]), ylab = "samples", xlab ="samples") } y.range <- c(1 - 2*(1 - min(rho)), 1) plot(k.vector, rho, main ="Cophenetic Coefficient", xlim=c

How to set cairo as default backend for x11() in R?

▼魔方 西西 提交于 2019-11-30 13:03:26
问题 I am using ggplot2 on ubuntu 12.04. By default my x11 type is set to Xlib. So when I use a smoother in qplot, I get an error like: "semi-transparency is not supported on this device: reported only once per page". However, if I call x11(type="cairo"), everything works fine. How do I get cairo as the default backend for x11? 回答1: Define another function 'x11' which sets the proper type: x11 = function (...) grDevices::x11(...,type='cairo') 回答2: To make this permanent, you could add the

include cairo R on a mac

被刻印的时光 ゝ 提交于 2019-11-30 12:41:49
I'm trying to use 'Cairo' package in Rstudio, using the command install.packages('Cairo') and it goes through with no problem. I get this message- The downloaded binary packages are in /var/folders/xn/c1nj85gx62b89876s15sbv9h0000gn/T//RtmpK9JM0l/downloaded_packages The package appears in the packages list, but when I try to include the package using library(Cairo) or library('Cairo') I get this error mesage- Error : .onLoad failed in loadNamespace() for 'Cairo', details: call: dyn.load(file, DLLpath = DLLpath, ...) error: unable to load shared object '/Library/Frameworks/R.framework/Versions/3

How do I render *parts* of a svg file?

假装没事ソ 提交于 2019-11-30 09:43:54
I want to render parts of a svg file by name but for the life of me I cannot figure out how to do so (using python + gtk). Here's the svg file in question: http://david.bellot.free.fr/svg-cards/files/SVG-cards-2.0.1.tar.gz ( Update: this file no longer exists, but you can track it down at http://svg-cards.sourceforge.net/ ) On his site, David, says: You can draw a card either by rendering the file onto a pixmap and clipping each card manually or by using the card's name through a DOM interface. All cards are embedded into a SVG group. I don't know what he means by a DOM interface. I have done

Simple C++ Graphics Library

折月煮酒 提交于 2019-11-30 09:14:38
问题 Any suggestions for a simple C++ library I can use to create an image to a specified size, with either a fixed rgb colour value or ideally supporting gradients. Needs to work on Windows and ideally but not required to work on OS X as well. I've found Cairo, but just wondered if there was anything else as it seems quite simple what I require. 回答1: Cairo is an exceptional library for this task. If you're thinking it's overkill, I can reassure you that it most definitely is not a bloated or

Can't install cairo with cabal on Windows - how to get pkg-config on win?

百般思念 提交于 2019-11-30 08:37:25
问题 Configuring cairo-0.12.0... setup.exe: The program pkg-config version >=0.9.0 is required but it could not be found. cabal: Error: some packages failed to install: cairo-0.12.0 failed during the configure step. The exception was: ExitFailure 1 so how can I get pkg-config on windows or how to install cairo then ? 回答1: Do you have the cairo development files installed? Recall this isn't the same as having a cairo dll! See the Windows section of their download page for binaries. Also, you can

How to set cairo as default backend for x11() in R?

旧城冷巷雨未停 提交于 2019-11-30 05:16:00
I am using ggplot2 on ubuntu 12.04. By default my x11 type is set to Xlib. So when I use a smoother in qplot, I get an error like: "semi-transparency is not supported on this device: reported only once per page". However, if I call x11(type="cairo"), everything works fine. How do I get cairo as the default backend for x11? Define another function 'x11' which sets the proper type: x11 = function (...) grDevices::x11(...,type='cairo') To make this permanent, you could add the following lines to your ~/.Rprofile file: setHook(packageEvent("grDevices", "onLoad"), function(...) grDevices::X11

How do I prevent Rplots.pdf from being generated?

对着背影说爱祢 提交于 2019-11-30 00:43:33
问题 I am working with some R code that generates a number of images as png files; however, a Rplots.pdf file keeps on being generated in the working directory, is there a way to prevent this from happening? library(Cairo) CairoPNG(file = "graphs.png") nf <- layout(matrix(c(1:8), 2, 4, byrow=T), c(1, 1), c(1, 1, 1, 1), TRUE) for (k in 1:num.k) { plotMatrix(connect.matrix.ordered[k,,], log = F, main = paste("k=", k.vector[k]), sub = paste("Cophenetic coef.=", rho[k]), ylab = "samples", xlab =

How can I get the output of a matplotlib plot as an SVG?

て烟熏妆下的殇ゞ 提交于 2019-11-29 22:41:46
I need to take the output of a matplotlib plot and turn it into an SVG path that I can use on a laser cutter. import matplotlib.pyplot as plt import numpy as np x = np.arange(0,100,0.00001) y = x*np.sin(2*pi*x) plt.plot(y) plt.show() For example, below you see a waveform. I would like to be able to output or save this waveform as an SVG path that I can later work with in a program such as Adobe Illustrator. I am aware of an SVG library called "Cairo" that matplotlib can use ( matplotlib.use('Cairo') ), however it's not clear to me that this will give me access to the SVG path that I need, even