<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">Le 28/11/2014 15:45, Collewet Guylaine
a écrit :<br>
</div>
<blockquote
cite="mid:651A5DDAC5F8034291AB7F20A27B99B4013C8AB0@Jaudy.rennes.cemagref.fr"
type="cite">
<meta http-equiv="Content-Type" content="text/html;
charset=ISO-8859-1">
<meta name="Generator" content="Microsoft Word 14 (filtered
medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri","sans-serif";
mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
span.EmailStyle17
{mso-style-type:personal-compose;
font-family:"Calibri","sans-serif";
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;
font-family:"Calibri","sans-serif";
mso-fareast-language:EN-US;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:70.85pt 70.85pt 70.85pt 70.85pt;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
<div class="WordSection1">
<p class="MsoNormal"><span lang="EN-US">Hello,<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">I would like to plot an
image using a colormap with plotlib (pcolor function)<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">In order to “zoom” on
the values between A and B, I use the function caxis([A B])<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">But I would like also
the pixels with values lower than A or greater than B to be
colored in white as the background<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Is it possible to do
that?<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Thanks <o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Guylaine Collewet<o:p></o:p></span></p>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:users@lists.scilab.org">users@lists.scilab.org</a>
<a class="moz-txt-link-freetext" href="http://lists.scilab.org/mailman/listinfo/users">http://lists.scilab.org/mailman/listinfo/users</a>
</pre>
</blockquote>
Hello,<br>
<br>
Try this :<br>
<br>
colormap([1 1 1;jetcolormap(128);1 1 1])<br>
x=linspace(-1,1,100);<br>
[X,Y]=meshgrid(x,x);<br>
pcolor(cos(%pi*(X.^2+Y.^2)))<br>
shading flat<br>
caxis([0 0.9])<br>
<br>
hth<br>
<br>
S.<br>
</body>
</html>