-
It seems like the default is for the SVG to be transparent, which doesn't work very well with some svg renderers such as the one built into IntelliJ. Is there any way to change this? The code I'm using to test this is: val df = mapOf(
"display" to (0..10).map { (0..10).random() },
"value" to (0..10).map { (3..35).random() }
)
val plot = lets_plot(df) {
x = "display"
y = "value"
} + geom_point(df)
ggsave(plot, "graph.svg") The outputted svg looks like this when rendered in Firefox and in IntelliJ |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
That's right, there is no 'background' in SVG container - it's always transparent. One way to make it opaque is to manually add a filled rectangle before the rest of the contents:
Such an option in |
Beta Was this translation helpful? Give feedback.
That's right, there is no 'background' in SVG container - it's always transparent.
One way to make it opaque is to manually add a filled rectangle before the rest of the contents:
Such an option in
ggsave()
would be useful IMO.Even better would be to have an easy way to set a desirable background in IDEA SVG viewer itself - please vote: https://youtrack.jetbrains.com/issue/IDEA-250345