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

Saving multiple plots in one file gives incorrect results #5

Closed
hadley opened this issue Aug 31, 2015 · 0 comments
Closed

Saving multiple plots in one file gives incorrect results #5

hadley opened this issue Aug 31, 2015 · 0 comments

Comments

@hadley
Copy link
Member

hadley commented Aug 31, 2015

devSVG("test.svg")
plot(1, xlab = "", ylab = "", axes = F)
plot(2, xlab = "", ylab = "", axes = F)
dev.off()

gives

<?xml version="1.0" encoding="UTF-8"?>
<svg xmlns="http://www.w3.org/2000/svg" width="722.70" height="578.16" viewBox="0,0,722.70,578.16">
<desc>R SVG Plot!</desc>
<rect width="100%" height="100%" style="fill:#FFFFFF"/>
<circle cx="369.68" cy="284.91" r="2.34" style="stroke-width:1;stroke:#000000;fill:#FFFFFF;stroke-opacity:1.000000;fill-opacity:0.000000" />
<circle cx="369.68" cy="284.91" r="2.34" style="stroke-width:1;stroke:#000000;fill:#FFFFFF;stroke-opacity:1.000000;fill-opacity:0.000000" />
</svg>

Given that svg doesn't support multiple files trivially, I'd recommend eliminating the onefile argument and throwing an error if the user attempts to draw more than one

@hadley hadley changed the title Saving one multiple plots in one file gives incorrect results Saving multiple plots in one file gives incorrect results Aug 31, 2015
@hadley hadley closed this as completed in 776a611 Sep 1, 2015
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

1 participant