[scilab-Users] Re: 2D surface plot : color scale adjustments

Antoine Monmayrant antoine.monmayrant at laas.fr
Fri Sep 2 09:58:56 CEST 2011


Le 01/09/2011 17:57, Damien a écrit :
> Hello,
> I would like also to plot separately several 2D mesh surfaces with the same
> color scale using the jetcolormap. I tried several color options without
> success. Need also plotlib for that ? Here is a simple example :
>
> X = [
>      1.    1.25    1.5    1.75    2.    2.25    2.5    2.75    3.
>      1.    1.25    1.5    1.75    2.    2.25    2.5    2.75    3.
>      1.    1.25    1.5    1.75    2.    2.25    2.5    2.75    3.
>      1.    1.25    1.5    1.75    2.    2.25    2.5    2.75    3.
>      1.    1.25    1.5    1.75    2.    2.25    2.5    2.75    3.
>      1.    1.25    1.5    1.75    2.    2.25    2.5    2.75    3.
>      1.    1.25    1.5    1.75    2.    2.25    2.5    2.75    3.
>      1.    1.25    1.5    1.75    2.    2.25    2.5    2.75    3.
>      1.    1.25    1.5    1.75    2.    2.25    2.5    2.75    3.
> ]
>
> Y = [
>      1.      1.      1.      1.      1.      1.      1.      1.      1.
>      1.25    1.25    1.25    1.25    1.25    1.25    1.25    1.25    1.25
>      1.5     1.5     1.5     1.5     1.5     1.5     1.5     1.5     1.5
>      1.75    1.75    1.75    1.75    1.75    1.75    1.75    1.75    1.75
>      2.      2.      2.      2.      2.      2.      2.      2.      2.
>      2.25    2.25    2.25    2.25    2.25    2.25    2.25    2.25    2.25
>      2.5     2.5     2.5     2.5     2.5     2.5     2.5     2.5     2.5
>      2.75    2.75    2.75    2.75    2.75    2.75    2.75    2.75    2.75
>      3.      3.      3.      3.      3.      3.      3.      3.      3.
> ]
>
> Z = [
>      10.          12.378785    15.776985    18.793712    20.
> 18.793712    15.776985    12.378785    10.
>      6.7120752    9.3148988    13.296428    16.948512    18.554367
> 17.391638    14.145787    10.465468    7.9798151
>      2.904725     5.6028542    10.054341    14.275437    16.300681
> 15.303967    12.025772    8.2734174    5.8472513
>      0.0775566    2.8346132    7.6240519    12.268768    14.630681
> 13.810827    10.579788    6.838548     4.4892417
>      0.           2.8368326    7.7451161    12.521141    15.
> 14.26884     11.09501     7.3747073    5.
>      3.4701546    6.4219044    11.17611     15.712804    18.023279
> 17.254863    14.131846    10.425839    7.8818397
>      9.4972501    12.573709    16.95673     20.967917    22.893206
> 21.996447    18.928161    15.244272    12.439776
>      15.75388     18.875592    22.763219    26.127407    27.596172
> 26.570533    23.612578    20.026161    17.02162
>      20.          22.952662    26.247008    28.94533     30.
> 28.94533     26.247008    22.952662    20.
> ]
>
> hh = scf();
> drawlater;
> mesh(X,Y,Z);
> xset('colormap',jetcolormap(128));
> ee = gce();
> ee.color_flag = 3;
> drawnow;
>
> Regards
> Damien
>
> --
> View this message in context: http://mailinglists.scilab.org/2D-surface-plot-color-scale-adjustments-tp2984524p3301732.html
> Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com.
The easiest way I found to plot several colorplots with the same scale 
is to use contourf and specify the same range to scale color to (ie the 
same 'nz' vector).
But this only works for 2D intensity maps, no 3D!

Antoine



More information about the users mailing list