<html><head></head><body><div style="font-family: Verdana;font-size: 12.0px;"><div>
<div>Hi Mike,</div>

<div> </div>

<div>thanks for your reply.</div>

<div>Yeah, exactly that is the problem - In a previous experiment I had used the "artificial point" trick, but the values I had by then were closer to each other (say, before I had minimum 60 maximum 400; now I have minimum 4 and maximum 1300) than they are now. Thus, by the previous experiment this artificial point wasn't really noticed nor intefering with the data, but now it is, so it can't be ignored unfortunately. </div>

<div> </div>

<div>But thank you very much for your effort, Mike :)</div>

<div>May be someone else has an idea or a simple guess on how to proceed? I guess it shouldn't be that difficult...I am running out of ideas though....</div>

<div> </div>

<div>Thanks a lot,</div>

<div>Larissa</div>

<div> </div>

<div> 
<div name="quote" style="margin:10px 5px 5px 10px; padding: 10px 0 10px 10px; border-left:2px solid #C3D9E5; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">
<div style="margin:0 0 10px 0;"><b>Gesendet:</b> Montag, 22. Juli 2013 um 18:21 Uhr<br/>
<b>Von:</b> "Mike Page" <Mike@Page-One.Waitrose.com><br/>
<b>An:</b> "International users mailing list for Scilab." <users@lists.scilab.org><br/>
<b>Betreff:</b> Re: [Scilab-users] Colorbar_same color code, different graphs</div>

<div name="quoted-content">
<div><span class="515191716-22072013"><font color="#0000ff" face="Arial" size="2">Hi Larissa,</font></span></div>

<div> </div>

<div><span class="515191716-22072013"><font color="#0000ff" face="Arial" size="2">Sorry, but I don't know how to do what you want.  As far as I know, when you assign a colormap to a figure, the colors span across the range of the data (so zmax = red and zmin = blue for example).  I think you want them to span across the data bounds of the figure, but I don't know how to do that.</font></span></div>

<div> </div>

<div><span class="515191716-22072013"><font color="#0000ff" face="Arial" size="2">The idea I mentioned before will produce a colorbar that spans the right set of colors and has the right legend, but I don't know how to get the colors on the figure right.  I'm sure it can be done some way, but I don't know how.  Perhaps you could add an artificial point to your data to make it span the full range?</font></span></div>

<div> </div>

<div><span class="515191716-22072013"><font color="#0000ff" face="Arial" size="2">Mike.</font></span></div>

<div> </div>

<blockquote style="MARGIN-RIGHT: 0.0px;">
<div align="left" class="OutlookMessageHeader"><font face="Tahoma" size="2">-----Original Message-----<br/>
<b>From:</b> users-bounces@lists.scilab.org [mailto:users-bounces@lists.scilab.org]<b>On Behalf Of </b>Larissa Schultze<br/>
<b>Sent:</b> 22 July 2013 13:24<br/>
<b>To:</b> Mike.PageOne@Googlemail.com<br/>
<b>Cc:</b> International users mailing list for Scilab.<br/>
<b>Subject:</b> [Scilab-users] Colorbar_same color code, different graphs</font><br/>
 </div>

<div style="FONT-FAMILY: Verdana;FONT-SIZE: 12.0px;">
<div>
<div><span style="COLOR: rgb(0,0,205);">Hi everybody,</span></div>

<div> </div>

<div><span style="COLOR: rgb(0,0,205);">thank you a lot for your reply, Mike.</span></div>

<div><span style="COLOR: rgb(0,0,205);">The suggestion sounds really good, but I couldn't make it work yet, unfortunately.</span></div>

<div><span style="COLOR: rgb(0,0,205);">So again, for the table:</span></div>

<div> </div>

<div>Nan     0.     20.     60.     100.    140.    180.    200.  <br/>
    0.      Nan    0.      Nan     Nan     Nan     Nan     Nan   <br/>
    5.      Nan    68.     73.     61.     63.     67.     Nan   <br/>
    40.     Nan    17.     9.      10.     12.     17.     Nan   <br/>
    75.     Nan    14.     7.      6.      6.      12.     Nan   <br/>
    110.    Nan    15.     6.      4.      6.      21.     Nan   <br/>
    145.    Nan    21.     28.     26.     20.     34.     Nan   <br/>
    150.    Nan    Nan     Nan     Nan     Nan     Nan     Nan </div>
 

<div><span style="COLOR: rgb(0,0,205);">I used the following commands:</span></div>

<div> </div>

<div>"</div>

<div>[fd,SST,Sheetnames,Sheetpos] = xls_open('E:\XXXXXX.xls')<br/>
Sheets = readxls('E:\XXXXXXX.xls');<br/>
typeof(Sheets);<br/>
s1=Sheets(1);<br/>
data=s1.value;<br/>
x=data(1,2:8);<br/>
y=data(2:8,1);<br/>
z=data(2:8,2:8);<br/>
xx = linspace(0,200,200);<br/>
yy = linspace(0,150,200);<br/>
[xp,yp] = ndgrid(xx,yy);<br/>
zp = linear_interpn(xp,yp, x, y, z);<br/>
clf();<br/>
surf(xx,yy,zp);<br/>
f=get("current_figure");<br/>
f.color_map=jetcolormap(512);<br/>
h=get("hdl") //get handle on current entity (here the surface)<br/>
h.color_flag=1;<br/>
a=gca();<br/>
a.auto_scale="off";<br/>
a.tight_limits="on";<br/>
a.data_bounds=[0,0,0;200,150,1300]<br/>
colorbar(0,1300);</div>

<div>"</div>

<div> </div>

<div><span style="COLOR: rgb(0,0,205);">Still, the colors in the figure do not correspond to those of the colorbar</span><span style="COLOR: rgb(0,0,255);">. I mean, according to the colorbar, this dataset should have basically different dark blue tones...and that is what I am aiming at. ...but...</span><span style="COLOR: rgb(0,0,205);">how can I possibly make it work? Can anybody help me please?</span></div>

<div><span style="COLOR: rgb(0,0,205);">It would be great!!!!</span></div>

<div> </div>

<div><span style="COLOR: rgb(0,0,205);">thank you in advance and kind regards,</span></div>

<div><span style="COLOR: rgb(0,0,205);">Larissa</span></div>

<div>
<div> </div>

<div> </div>

<div> </div>

<div> </div>

<div> </div>

<div> </div>

<div> </div>

<div style="BORDER-LEFT: rgb(195,217,229) 2.0px solid;PADDING-BOTTOM: 10.0px;MARGIN: 10.0px 5.0px 5.0px 10.0px;PADDING-LEFT: 10.0px;PADDING-RIGHT: 0.0px;PADDING-TOP: 10.0px;">
<div style="MARGIN: 0.0px 0.0px 10.0px;"><b>Gesendet:</b> Dienstag, 16. Juli 2013 um 11:09 Uhr<br/>
<b>Von:</b> "Mike Page" <Mike@Page-One.Waitrose.com><br/>
<b>An:</b> "International users mailing list for Scilab." <users@lists.scilab.org><br/>
<b>Betreff:</b> Re: [Scilab-users] Colorbar_same color code, different graphs</div>

<div>
<div><span class="343230409-16072013"><font color="#0000ff" face="Arial" size="2">Hi Larissa,</font></span></div>

<div> </div>

<div><span class="343230409-16072013"><font color="#0000ff" face="Arial" size="2">I'm no expert on this, but have you tried changing the data_bounds for the figure's children independently?  I think if you just set the colorbar limits with colorbar(a,b), that only changes the legend on the bar itself.</font></span></div>

<div> </div>

<div><span class="343230409-16072013"><font color="#0000ff" face="Arial" size="2">Try f=gcf(); then look at f.children(1),data_bounds or f.children(2).data_bounds.  I think one will be for the plot and the other for the colorbar.  If you change these limits directly you may get the effect you are looking for.</font></span></div>

<div> </div>

<div><span class="343230409-16072013"><font color="#0000ff" face="Arial" size="2">Sorry if I misunderstood your question.</font></span></div>

<div> </div>

<div><span class="343230409-16072013"><font color="#0000ff" face="Arial" size="2">Mike.</font></span></div>

<div> </div>

<blockquote style="MARGIN-RIGHT: 0.0px;">
<div align="left" class="OutlookMessageHeader"><font face="Tahoma" size="2">-----Original Message-----<br/>
<b>From:</b> users-bounces@lists.scilab.org [mailto:users-bounces@lists.scilab.org]<b>On Behalf Of </b>Larissa Schultze<br/>
<b>Sent:</b> 16 July 2013 08:48<br/>
<b>To:</b> International users mailing list for Scilab.<br/>
<b>Subject:</b> Re: [Scilab-users] Colorbar_same color code, different graphs</font><br/>
 </div>

<div style="FONT-FAMILY: Verdana;FONT-SIZE: 12.0px;">
<div style="BORDER-LEFT: rgb(195,217,229) 2.0px solid;PADDING-BOTTOM: 10.0px;MARGIN: 10.0px 5.0px 5.0px 10.0px;PADDING-LEFT: 10.0px;PADDING-RIGHT: 0.0px;PADDING-TOP: 10.0px;"><span style="LINE-HEIGHT: 1.6em;">Hello everyone,</span>

<div>
<div style="FONT-FAMILY: Verdana;FONT-SIZE: 12.0px;">
<div> </div>

<div>I have to plot several graphs with measurements ranging from 6 to 1300. I would like that these graphs obey the same color code, so that, in the example of jetcolormap, "1300" would always be dark red and "0" would always be dark blue for each graph. Now the values that I have for the different graphs are quite diverse: graph 1 has values ranging between "6" and "68" whereas graph 6 has values between "600" and "1300".</div>

<div> </div>

<div>How can I manage that the colorbar and the colorcode for both these graphs remains the same? (in this case, graph 1 would presumably have only a gradient of dark blue colors and graph 6 would have rather orange to red colors)</div>

<div>I tried changing the command of colorbar to "colorbar(0,1300)", but it didn't work at all...so I thought may be someone could give me a hint on how I would be able to align the color code these graphs...</div>

<div> </div>

<div>I put an example of my tables on the annex as well as the scilab commands that I have been using for that. I simply need the values of both tables to be registered according to one color code (1300=dark red, 6=dark blue)...I would appreciate it a lot if someone could help me. :) </div>

<div> </div>

<div>Thank you guys in advance!!!!</div>

<div>Larissa</div>

<div>
<div style="BORDER-LEFT: rgb(195,217,229) 2.0px solid;PADDING-BOTTOM: 10.0px;MARGIN: 10.0px 5.0px 5.0px 10.0px;PADDING-LEFT: 10.0px;PADDING-RIGHT: 0.0px;PADDING-TOP: 10.0px;"> </div>
</div>
</div>
</div>
</div>
</div>
</blockquote>
</div>
</div>
</div>
</div>
</div>
</blockquote>
</div>
</div>
</div>
</div></div></body></html>