<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=utf-8" http-equiv=Content-Type>
<META name=GENERATOR content="MSHTML 8.00.6001.23507"></HEAD>
<BODY>
<DIV><SPAN class=515191716-22072013><FONT color=#0000ff size=2 face=Arial>Hi
Larissa,</FONT></SPAN></DIV>
<DIV><SPAN class=515191716-22072013><FONT color=#0000ff size=2
face=Arial></FONT></SPAN> </DIV>
<DIV><SPAN class=515191716-22072013><FONT color=#0000ff size=2 face=Arial>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><SPAN class=515191716-22072013><FONT color=#0000ff size=2
face=Arial></FONT></SPAN> </DIV>
<DIV><SPAN class=515191716-22072013><FONT color=#0000ff size=2 face=Arial>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><SPAN class=515191716-22072013><FONT color=#0000ff size=2
face=Arial></FONT></SPAN> </DIV>
<DIV><SPAN class=515191716-22072013><FONT color=#0000ff size=2
face=Arial>Mike.</FONT></SPAN></DIV>
<DIV><SPAN class=515191716-22072013><FONT color=#0000ff size=2
face=Arial></FONT></SPAN> </DIV>
<BLOCKQUOTE style="MARGIN-RIGHT: 0px" dir=ltr>
<DIV dir=ltr class=OutlookMessageHeader align=left><FONT size=2
face=Tahoma>-----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<BR><BR></FONT></DIV>
<DIV style="FONT-FAMILY: Verdana; FONT-SIZE: 12px">
<DIV>
<DIV><SPAN style="COLOR: #0000cd">Hi everybody,</SPAN></DIV>
<DIV> </DIV>
<DIV><SPAN style="COLOR: #0000cd">thank you a lot for your reply,
Mike.</SPAN></DIV>
<DIV><SPAN style="COLOR: #0000cd">The suggestion sounds really good, but I
couldn't make it work yet, unfortunately.</SPAN></DIV>
<DIV><SPAN style="COLOR: #0000cd">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><BR>
<DIV><SPAN style="COLOR: #0000cd">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: #0000cd">Still, the colors in the figure do not
correspond to those of the colorbar</SPAN><SPAN style="COLOR: #0000ff">. 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: #0000cd">It would be great!!!!</SPAN></DIV>
<DIV> </DIV>
<DIV><SPAN style="COLOR: #0000cd">thank you in advance and kind
regards,</SPAN></DIV>
<DIV><SPAN style="COLOR: #0000cd">Larissa</SPAN></DIV>
<DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV
style="BORDER-LEFT: #c3d9e5 2px solid; PADDING-BOTTOM: 10px; MARGIN: 10px 5px 5px 10px; PADDING-LEFT: 10px; PADDING-RIGHT: 0px; WORD-WRAP: break-word; PADDING-TOP: 10px; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space"
name="quote">
<DIV style="MARGIN: 0px 0px 10px"><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 name="quoted-content">
<DIV><SPAN class=343230409-16072013><FONT color=#0000ff size=2 face=Arial>Hi
Larissa,</FONT></SPAN></DIV>
<DIV> </DIV>
<DIV><SPAN class=343230409-16072013><FONT color=#0000ff size=2 face=Arial>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 size=2 face=Arial>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 size=2
face=Arial>Sorry if I misunderstood your question.</FONT></SPAN></DIV>
<DIV> </DIV>
<DIV><SPAN class=343230409-16072013><FONT color=#0000ff size=2
face=Arial>Mike.</FONT></SPAN></DIV>
<DIV> </DIV>
<BLOCKQUOTE style="MARGIN-RIGHT: 0px">
<DIV class=OutlookMessageHeader align=left><FONT size=2
face=Tahoma>-----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: 12px">
<DIV
style="BORDER-LEFT: rgb(195,217,229) 2px solid; PADDING-BOTTOM: 10px; MARGIN: 10px 5px 5px 10px; PADDING-LEFT: 10px; PADDING-RIGHT: 0px; PADDING-TOP: 10px"><SPAN
style="LINE-HEIGHT: 1.6em">Hello everyone,</SPAN>
<DIV>
<DIV style="FONT-FAMILY: Verdana; FONT-SIZE: 12px">
<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) 2px solid; PADDING-BOTTOM: 10px; MARGIN: 10px 5px 5px 10px; PADDING-LEFT: 10px; PADDING-RIGHT: 0px; PADDING-TOP: 10px"> </DIV></DIV></DIV></DIV></DIV></DIV></BLOCKQUOTE></DIV></DIV></DIV></DIV></DIV></BLOCKQUOTE></BODY></HTML>