Actually, these are two questions towards Plots.jl with the GR backend in one post (hope that’s ok, I think they are related):
Is it possible to create a filled contour plot (using plot(linetype=:contourf, ...) without actually showing the contour lines?
And is it possible to obtain smoothly interpolated colors instead of discrete levels, without resorting to setting levels to a ridiculously high value?
The relevant line: contourf!(vertices_x, vertices_y, (x,y) -> i/100 .+ x.+y)
Essentially, I am trying to plot a 2D solution from a numerical simulation cell-by-cell, with values interpolated within each cell, by iterating over all cells and calling contourf with the respective cell vertex coordinates vertices_x, vertices_y.
However, the same plot with heatmap! yields something weird:
The relevant line: heatmap!(vertices_x, vertices_y, (x,y) -> i/100 .+ x.+y)
Not only are the coordinate locations mixed up, but also there does not seem to be any interpolation between values.
Is it possible to tell from what I showed here, what I am doing wrong?
OK, but is it possible to enable interpolation in heatmap? And if not, this brings me back to my original questions: How can I use a contour plot without showing the lines, and how can I get smoothly interpolated colors instead of discrete levels?
I have an idea how to solve your problem in plain GR, but this needs some modifications in the GR convenience layer. Please give me some time to check this. In case of “success” I can integrate that solution in Plots, too.
This would be highly appreciated, thanks. At the moment we are looking for a Julia-only plot solution for 2D numerical results, but thus far I am not 100% convinced that it is feasible for us.
OTOH, could you please confirm that turning off contour lines (either in Plots or plain GR) is currently not supported? In that case I can stop looking
Thank you for the suggestion. At the moment we try to stick to GR as a backend, as PGFPlotsX we would like to avoid the additional dependency of requiring a LaTeX installation present. We might come back to your proposed solution if we cannot manage to do it otherwise though.
No, unfortunately not. In the end, we decided to forego a Julia-only solution. Instead, we use WriteVTK.jl to write out vtk/vti/vtu files (depending on use case) and handle visualization and data analysis with ParaView.