Search code examples
plotcolorbarmaxima

Maxima: hard set colorbar's range in plot3d()


How do I hardset the colorbar's range in maxima's plot3d() ?

For instance,

(%i0) wxplot3d(cos(x)*cos(y),[x,-%pi,%pi],[y,-%pi,%pi]);

uses the default behaviour, which is a colorbar from -1 to +1, which yields

Plot with default colorbar

However, what if I want a colorbar spanning from 0 to +1 instead?


Solution

  • It is possible to do so by asking maxima to run a gnuplot set cbrange command before ploting

    (%i0) wxplot3d(cos(x)*cos(y),[x,-%pi,%pi],[y,-%pi,%pi], [gnuplot_preamble, "set cbrange [0:1]"]);
    

    which yields

    Colorbar spanning from 0 to 1, hence the saturation