JuliaPlots / Plots.jl

Powerful convenience for Julia visualizations and data analysis
https://docs.juliaplots.org
Other
1.83k stars 354 forks source link

Tiny axis labels when using GR with Plots in IJulia #1746

Open rdeits opened 6 years ago

rdeits commented 6 years ago

When viewing a plot from Plots.jl with the GR backend in IJulia, the axis labels end up unreadably small, e.g.:

screenshot from 2018-09-15 13-16-21

I can reproduce the issue using both the latest releases of Plots.jl and GR.jl, and it persists when using the master branches of Plots.jl and GR.jl (even after manually rebuilding GR.jl). It looks like there have been some resolution handling changes in GR recently, so perhaps this explains the issue?

Saving the figure to .png or .svg results in normally-sized axis labels.

mkborregaard commented 6 years ago

It sounds likely to be related to the resolution changes, yes

mkborregaard commented 6 years ago

It's the eternal issue with Plots that there are so many components that need to interlock - here the GR runtime, GR, Plots, IJulia, svg...

tkf commented 5 years ago

Is there a reason why SVG is the default? FYI PyPlot.jl avoids SVG because it's problematic:

disable SVG output by default, since displaying large SVGs (large datasets) in IJulia is slow, and browser SVG display is buggy. (Similar to IPython.)

--- https://github.com/JuliaPy/PyPlot.jl/blob/daadae458ecb696e29c45636d91a9e7b7eddc246/src/PyPlot.jl#L88

mkborregaard commented 5 years ago

That's not the issue here, though. Normally svg looks perfectly fine, and is pretty. It's just that GR recently changed it's default SVG resolution, and that has had some interactions with the rest of the ecosystem.

tkf commented 5 years ago

I see. Thanks for the explanation.