Skip to content
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

SVG does not work with Gadfly 1.4.0 and Compose 0.9.5 #1631

Closed
jojal5 opened this issue Mar 13, 2024 · 6 comments
Closed

SVG does not work with Gadfly 1.4.0 and Compose 0.9.5 #1631

jojal5 opened this issue Mar 13, 2024 · 6 comments

Comments

@jojal5
Copy link

jojal5 commented Mar 13, 2024

The following code does not work with Gadfly 1.4.0 and Compose 0.9.5

using DataFrames, Gadfly, RDatasets
iris = dataset("datasets","iris")
p = plot(iris, x=:SepalLength, y=:PetalLength, color=:Species, Geom.point)
draw(SVG("iris_plot.svg", 14cm, 8cm), p)

It return false.

@Mattriks
Copy link
Member

The false is a byproduct of some Compose function (yes we should track this down and return nothing). What version of Julia are you on? There was a recent issue fixed on Compose.jl#master (GiovineItalia/Compose.jl#441), so try:

]add Compose#master

if you are on a relatively recent version of Julia?

@jojal5
Copy link
Author

jojal5 commented Mar 13, 2024

Thank you for the quick response. I tried it on Julia 1.10.2 and Julia 1.9.4 using Compose.jl#master, but I encountered the same result – it returns false.

@Mattriks
Copy link
Member

I'm assuming your main issue here is that no file was produced? What OS are you on? I'll have to check later to see if I can replicate the issue.

@jojal5
Copy link
Author

jojal5 commented Mar 14, 2024

It returns false but the svg file is generated. Thank you for the answer. Does I close this issue ?

@Mattriks
Copy link
Member

Mattriks commented Mar 14, 2024

The false is a more of a Compose issue. You can replicate it by trying any of the examples in the Compose docs. Also you can get rid of it simply by adding: draw(); (a semi-colon after the draw()).

@jojal5
Copy link
Author

jojal5 commented Mar 14, 2024

Thank you!

@jojal5 jojal5 closed this as completed Mar 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants