Thickness_scaling in Plots.jl

I used thickness_scaling = 0.5 in plot() when using Plots but instead of making all lines narrower it enlarges the plot by a factor two.

I cannot reproduce. Which backend are you using? Which version of Plots are you on?

Here’s the current behaviour for GR:

using Plots
gr(size = (300, 300), linewidth = 2)
plot(sin, -π, π)

gr_def

plot(sin, -π, π, thickness_scaling = 0.5)

gr_ts

plot(sin, -π, π, dpi = 200)

Is this not expected?

I am using the pyplot backend on julia 0.6.4, with Plots 0.17.3 and PyPlot 2.6.0. I did not expect what you show. Between the first and the second plot I don’t see a decrease in line thickness of the axes for example, nor of the legend box. However, the fonts are decreased by a lot, which is not expected.

The font size and the line widths are increased or decreased by the same factor. Maybe that’s better visible with these examples:

plot(sin, -π, π, thickness_scaling = 1)

gr_ts1

plot(sin, -π, π, thickness_scaling = 5)

gr_ts5

I just checked pyplot() and I can confirm the problem you described above. It would be great if you could open an issue on Plots.jl for this. Thanks!

1 Like

Nvm, should be fixed by fix pyplot thickness_scaling (fix #1606) by daschw · Pull Request #1610 · JuliaPlots/Plots.jl · GitHub
Thanks for reporting!