Open biggsbiggsby opened 7 years ago
It seems that there is another issue where levels
attribute is also ignored when fill=true
, but works when fill=false
. It is always applied to the colorbar correctly though:
Plots.contour(collect(1:100)*collect(1:100)',fill=true,c=:turbid,levels=5)
This does appear to be a GR-related issue (@jheinen), though there are also bugs with the plotlyjs version (colorscale overlap and line widths)
The pyplot version appears to do what you expect:
Also tagging @daschw who is an expert on the colorbar functionality :-)
Hm, for me the example code on GR looks like this on master:
So the colors issue should be fixed on master.
The contourf issue has already been reported in https://github.com/JuliaPlots/Plots.jl/issues/1024.
As you can see, with GR a gray colourbar is shown, which somehow makes sense, because the gray contour is plotted later. Although I think that in this case the :turbid
colorbar looks nicer.
the linewidth in GR should be fixed by https://github.com/JuliaPlots/Plots.jl/pull/1221
It works for me on master now. Suddenly I doubt whether I remembered to check the GR version. Sweet fix, @daschw !
Let me redefine the issue.
Thx, what's your opinion on the colorbar color @mkborregaard (GR vs PyPlot)?
I think the plotly colorbar issue is a duplicate of #694
In this case PyPlot looks best, but generally I'd say it makes sense to show the colorbar for the latest plotted series?
There's also still this issue with GR:
It seems that there is another issue where levels attribute is also ignored when fill=true, but works when fill=false
This is turning into one of those intractable issues, where it's unclear how it can be closed and what backend it refers to...
In this case PyPlot looks best, but generally I'd say it makes sense to show the colorbar for the latest plotted series?
Agreed. So actually we should change the PyPlot behavior? The problem is: I can't think of a way to get the (nicer) PyPlot result with the current GR implementation in this current test example.
I think that the levels issue has something to do with the fact that GR.surface
is used for contourf
. I played around a little but I have no idea how to fix this. I think we need @jheinen's superpowers here.
:pray:
the level issue can only be fixed with a new contour fill routine - should be available with the next GR release ...
Dear all,
I was wondering if could be possible to remove or hide the lines (at the colorbar) related to contours.
This is the code to create the attached figure:
p1 = heatmap(xof, yof, abs.(U0_vtx1_v0), colorbar_title = L"$ |U(x, y)| $"); contour!(xof, yof, abs.(ROF(0))./maximum(abs.(ROF(0))), c=:grays, levels = 0.0:0.15:1) p2 = heatmap(xof, yof, angle.(U0_vtx1_v0), colorbar_title = L"$ \psi(x, y) $"); contour!(xof, yof, abs.(ROF(0))./maximum(abs.(ROF(0))), c=:black, levels = 0.0:0.15:1) plot(p1, p2, layout = (1, 2), xlabel = L"x", ylabel = L"y", size = (700, 330), ratio = 1, linewidth = 0.5)
@ccmejia your issue seems unrelated to this issue. Can you open a new issue for that and provide an example that can be run? Yours has some undefined variables.
Maybe same as #694 and #673
Maybe related to upstream issue of plotly/plotly.js#5098 and plotly/plotly.js#5099
Hi, I'm having some problems plotting contour line plots (
fill=false
) using the GR backend.MWE:
This gives:
This should first plot a filled contour using the turbid colorscale, then plot a line contour on top with the gray colorscale, with quite thick lines (w=10). Instead the colorscale is only applied to the plot when
fill=true
, otherwise the colorscale request is ignored, and the default is used. Additionally the line width command is always ignored on these plots. (The same behavior occurs when only a line plot is made; the combination plot here is just to contrast the working and aberrant behavior.)Version info:
GR 0.24.0
Plots 0.13.1
Julia 0.6.1