Closed Ininterrompue closed 1 year ago
@t-bltg PR is ready for review, however build is failing when trying to use PyPlot...
Same error as https://github.com/JuliaPlots/Plots.jl/blob/fceaf217e59dd4c200491d09608049ba433cd2f8/src/examples.jl#L1239.
No fix currently (conda
library incompatibility), so we cannot merge this PR as is :/
Got it, I will replace those code examples with backticked Julia code instead
@Ininterrompue I think the libstdc++.so.X: version GLIBCXX_X.X.X
bug is now fixed, can you revert the 2 latest commits, and rebase this PR against master, this should work now.
Ok I've rewritten the examples to be compatible with GR. However I'm still preferring PyPlot for the renders because I'm still getting some bugs when using GR. For example,
g(x, y) = log(x*y)
x = 10 .^ range(0, 6, length=100)
y = 10 .^ range(0, 6, length=100)
z = @. g(x', y)
contourf(x, y, z, color=:plasma,
xscale=:log10, yscale=:log10,
title=L"\log(xy)",
xlabel=L"x",
ylabel=L"y")
renders incorrectly:
whereas its PyPlot version renders correctly:
And I think this is a known issue. Also, the contour labels look cleaner in PyPlot and use round numbers. And in the last plot, the figure window does not expand in PyPlot like it does in GR, even though aspect_ratio=:equal
is used, so PyPlot is imo more visually appealing.
Thanks for adjusting the examples.
That's an interesting bug indeed. The only issue I could find was https://discourse.julialang.org/t/issues-with-plots-contourf-and-logarithmic-axes/74185.
But it is strange that this has not been discussed elsewhere in Plots.jl
or GR.jl
.
I think it's worth opening an issue to fix this. EDIT: opened an issue here: https://github.com/JuliaPlots/Plots.jl/issues/4540.
Thanks for the quality work here @Ininterrompue !
@t-bltg I don't see the new changes on dev; deployment was canceled here, is there an error with my code?
Probably a spurious failure. I've restarted it ...
Hum, still failing but github seems green: https://www.githubstatus.com/.
@Ininterrompue, https://docs.juliaplots.org/dev/series_types/contour/ :tada: .
Fix https://github.com/JuliaPlots/PlotDocs.jl/issues/54 Fix https://github.com/JuliaPlots/PlotDocs.jl/issues/296