Hi,
I have an error at the level of pgfplots package when using pgfplotsx() backend to draw surfaces. Here is the working example provided by the Plots documentation
surface(range(-3,3, length=30), range(-3,3, length=30),
(x, y)->exp(-x^2-y^2),
label="",
colormap_name = "viridis",
extra_kwargs =:subplot)
returns
! Package pgfplots Error: Sorry, non-uniform colormaps are only partially imple
mented, yet: the provided points must be multiples of the mesh width h=0.11157p
t (but I found one with H/h = 0.11201pt/0.11157pt = 1+-0.004 which is no intege
r). Perhaps it helps to provide the mesh widths as argument as in {<name>}{[1cm
] <color arguments>}? The error occured near `rgb(0.50196078cm)=(0.73568300,0.2
1590600,0.33024500)'.
However, other types of 3d plot are working, like for instance (also from Plots doc)
n = 100
ts = range(0, stop = 8Ď€, length = n)
x = ts .* map(cos, ts)
y = (0.1ts) .* map(sin, ts)
z = 1:n
plot(x, y, z, zcolor = reverse(z), m = (10, 0.8, :blues, Plots.stroke(0)), leg = false, cbar = true, w = 5)
plot!(zeros(n), zeros(n), 1:n, w = 10)
Now you may need me to give you a bit of context:
I have just upgraded Julia from 1.1.1 to 1.5.2. On the previous version 1.1.1, I had a segmentation fault for any kind of plots, and in the log, there was something like
_update_subplot_colors at /home/antonin/.julia/packages/Plots/cc8wh/src/args.jl:1446
_update_subplot_args at /home/antonin/.julia/packages/Plots/cc8wh/src/args.jl:1533
unknown function (ip: 0x7f4b833a94cb)
jl_fptr_trampoline at /buildworker/worker/package_linux64/build/src/gf.c:1842
jl_apply_generic at /buildworker/worker/package_linux64/build/src/gf.c:2197
_subplot_setup at /home/antonin/.julia/packages/Plots/cc8wh/src/pipeline.jl:299
_plot! at /home/antonin/.julia/packages/Plots/cc8wh/src/plot.jl:206
After the upgrading, everything is working just fine except the surface with pgfplotsx backend. I can draw surfaces with other backends. That may be a completely different problem, but that was the beginning of my troubles with pgfplotsx, that was working great before a global package update in Julia 1.1.1.
Thanks a lot for your help