[scilab-Users] Problem with colormaps
Antoine Monmayrant
antoine.monmayrant at laas.fr
Wed Feb 8 10:15:21 CET 2012
On 02/08/2012 09:57 AM, Antoine Monmayrant wrote:
> Hi everyone,
>
> I came across this bug (or at least this annoying behaviour) several
> years ago and got beaten again this morning: the colormap changes when
> you add a plot to a figure and this can alter the way a grayplot or a
> contour is displayed:
>
> //dummy matrix for a grayplot
> a=[1,2,3;4,5,6;7,8,9];
> h=scf();
> h.color_map=hotcolormap(6);
> grayplot(1:3,1:3,a);//now we see 4 rectangles: orange, pale yellow,
> red and yellow
> //let's add a dummy plot: 1st diagonal in black
> plot(1:3,1:3,'k');
> //the change of the colormap as affected the way "a" is displayed:
> orange, white, orange, pale yellow
> //again let's add a dummy plot: 2nd diagonal in green
> plot(1:3,3:-1:1,'g');
> //the change of the colormap as affected the way "a" is displayed:
> yellow, white, orange, pale yellow
> plot(1:3,2*ones(1:3),'c');
> //again: "a" is now yellow, black, orange, white
>
> Any workaround to avoid this and keep my original grayplot unchanged
> when adding some more plots with colors that are not already present
> in the colormap?
>
> Cheers,
>
> Antoine
>
> --
> To unsubscribe from this mailing-list, please send an empty mail to
> users-unsubscribe at lists.scilab.org
> To check the archives of this mailing list, see
> http://mailinglists.scilab.org/
>
OK, I'll answer my own question: using direct mapping solves the issue.
(I knew someone on this mailing list will find a solution, I didn't that
will be me!)
--
+++++++++++++++++++++++++++++++++++++++++++++++++++++++
Antoine Monmayrant LAAS - CNRS
7 avenue du Colonel Roche
31077 TOULOUSE
Cedex 4 FRANCE
Tel:+33 5 61 33 64 59
email : antoine.monmayrant at laas.fr
permanent email : antoine.monmayrant at polytechnique.org
+++++++++++++++++++++++++++++++++++++++++++++++++++++++
More information about the users
mailing list