New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
show method error when trying to use Cairo #372
Comments
The issue here is that I don't use Weave.jl so I'm guessing that if you can change the figure output to PNG in Weave, it might work. Alternatively, you might try this: using Compose
Compose.show(io::IO, ::MIME"application/pdf", ctx::Context) =
draw(PDF(io, default_graphic_width, default_graphic_height), ctx) and then run Weave. But I don't know what show output Weave wants for pdf. If it doesn't work I'll have to investigate Weave.jl. |
Ahhh yeah that would explain it. I'll see if I can change the figure output as a workaround. I should probably also suggest to Weave that it warn users when they are attempting to do pdf output with Gadfly and Compose |
Did you try the new |
I have not yet. But I can try it out here in a few minutes :-D. I'll let you know if it works. |
It fails but it definitely got farther. Weave complains about default_graphic_width not being defined. More detailed stacktrace can be found below.
|
I put this chunk in a jmd file, and it works: import Cairo
using Compose
img = compose(context(),
(context(units=UnitBox(0, 1.2, 1, -1)), circle(0.70, 0.75, 0.2), fill("gold"),
(context(), rectangle(), fill("transparent"), stroke("black")))
)
draw(PDF(), img); The |
I tested the For now, the workaround is to explicitly include the |
See further investigation in JunoLab/Weave.jl#266 |
Cairo and Compose appear to be having some issues regarding the
show
method. I'm attempting to generate some pdf's using Weave.jl and this sample code block I'm putting below generates a complaint thinking the Cairo and/or Fontconfig packages are not installed. It seems to be due to a problem with the show method which I'm assuming Cairo is supposed to provide but Compose can't see it.I thought at first maybe I was having a problem with precompilation but even after blowing away the precompile cache I'm still getting the error.
I'm using current head for both Compose and Gadfly packages.
The error and stacktrace are below.
The text was updated successfully, but these errors were encountered: