jishnub
1
I’m a bit puzzled by what’s happening here, is this a known issue?
(@v1.8) pkg> st -m Plots
Status `~/.julia/environments/v1.8/Manifest.toml`
[91a5bcdd] Plots v1.33.0
julia> using Plots
julia> r = range(-1, 1, length=10);
julia> plot(r, r*1e-20)
This produces
Why is the plot seemingly zero?
This doesn’t happen if I use PyPlot
, in which case I obtain a line as expected
jishnub
2
Evidently, it’s a poorly chosen default ylim
. The following makes this look as expected
julia> plot(r, r*1e-20, ylim=extrema(r*1e-20))
2 Likes
A tip, if you will, for better formatting of y-axis labels. To your solution add the keyword argument:
yformatter=x->round(x,sigdigits=2)
2 Likes
jishnub
4
I wonder if the default settings could be improved