-
Notifications
You must be signed in to change notification settings - Fork 38
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
ggsave: saving geomImshow()
to SVG produces fuzzy picture
#188
Comments
Same issue in Python LP. |
In prev. LP v3.1.0 (py) saving imshow to SVG worked producing sharp images. |
Test notebook: %use lets-plot
%use lib-ext
LetsPlot.getInfo()
//%
import java.awt.image.*
import javax.imageio.*
import java.nio.file.*
fun display(path: String): Any {
if (path.endsWith("svg")) {
val svg = Files.readString(Path.of(path))
return HTML(svg)
} else {
val img = ImageIO.read(File(path))
return Image(img)
}
}
//%
val A2x3x4 = RasterData.create(
listOf(
listOf(
listOf(1.0, 0.0, 0.0, 1.0), listOf(0.0, 1.0, 0.0, 1.0), listOf(0.0, 0.0, 1.0, 1.0)
),
listOf(
listOf(0.0, 1.0, 0.0, 0.3), listOf(0.0, 0.0, 1.0, 0.3), listOf(1.0, 0.0, 0.0, 0.3)
)
)
)
//%
val p = ggplot() + geomImshow(A2x3x4)
p.show()
//%
display(ggsave(p, "LPK-188.svg"))
//%
display(ggsave(p, "LPK-188.png")) |
Fixed in 4.4.2 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Try
ggsave
the last plot in image_101.ipynb to svg :Saving to HTML is fine.
The text was updated successfully, but these errors were encountered: