<div dir="ltr"><div>Hi Rafael</div><div><br></div><div>These examples are an enormous help to me. I can say for sure, I would have never found out by reading the documentation. The "refmat" is new to me. I now see how you can "stack" several colormaps with the plot, simply f<span style="color:rgb(92,92,92)">.</span><span style="color:rgb(170,170,170)">color_map</span> <span style="color:rgb(92,92,92)">=</span> <span style="color:rgb(74,85,219)">[f</span><span style="color:rgb(92,92,92)">.</span><span style="color:rgb(170,170,170)">color_map</span><span style="color:rgb(0,0,0)">;</span> <span style="color:rgb(50,185,185)">name2rgb</span><span style="color:rgb(74,85,219)">(</span><span style="color:rgb(0,0,0)">cntcolorname</span><span style="color:rgb(74,85,219)">)</span><span style="color:rgb(74,85,219)">]</span><span style="color:rgb(0,0,0)">; ... the semicolon gives space to a new one. I see how you call contour2d with the style option the second time. Supposedly the default is the first one, but you invoke the second one with the style option. I see how you now define the length of the colorbar because if you don't, then the colorbar will paint both colormaps on the bar :-/</span></div><div><span style="color:rgb(0,0,0)"><br></span></div><div><span style="color:rgb(0,0,0)">Thank you for suggesting the grey colors, it works excellent together with the jetcolors.</span></div><div><span style="color:rgb(0,0,0)"><br></span></div><div><span style="color:rgb(0,0,0)">Best regards,</span></div><div><span style="color:rgb(0,0,0)">Claus</span></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Jan 22, 2018 at 8:51 PM, Rafael Guerra <span dir="ltr"><<a href="mailto:jrafaelbguerra@hotmail.com" target="_blank">jrafaelbguerra@hotmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Claus,<br>
<br>
Yes, you can use different colors for the contours.<br>
See sample code here below which displays grey contours but could be adapted<br>
to display contours with different colors for each contour level.<br>
<br>
<<a href="http://mailinglists.scilab.org/file/t495698/contour2d_logscale_colorfiled_colored_contour.png" target="_blank" rel="noreferrer">http://mailinglists.scilab.<wbr>org/file/t495698/contour2d_<wbr>logscale_colorfiled_colored_<wbr>contour.png</a>><br>
<span><br>
//START OF CODE<br>
frequencies = [200 2000 20000]; // Hz<br>
angles = [0 30 60 90 120 150 180]; // degrees - convert to radians!<br>
mag00 = [69.253448 92.163385 87.414209]; // on-axis freq-response<br>
mag30 = [68.461357 90.569082 76.073549];<br>
mag60 = [65.842262 90.745621 74.152067];<br>
mag90 = [59.420658 80.893365 55.975304];<br>
mag120 = [52.505173 80.795915 44.363582];<br>
mag150 = [53.829987 59.793715 42.443964];<br>
mag180 = [55.650341 73.457973 55.608187];<br>
<br>
magnitudes = [mag00' mag30' mag60' mag90' mag120' mag150' mag180'];<br>
<br>
negative_angles = -angles(2:7);<br>
neg_angle_magnitudes = magnitudes(:,2:7);<br>
angles = [angles negative_angles];<br>
magnitudes = [magnitudes neg_angle_magnitudes];<br>
[angles idx] = gsort(angles,'g','i');<br>
magnitudes = magnitudes(:,idx);<br>
<br>
clf;<br>
</span>zn = 40:10:90;<br>
nz = length(zn);<br>
zn2 = 40:0.5:90;<br>
nz2 = length(zn2);<br>
f = gcf();<br>
f.color_map= jetcolormap(nz2);<br>
contour2d(frequencies,angles,<wbr>magnitudes,zn,logflag="ln");<br>
contourf(frequencies,angles,<wbr>magnitudes,zn2);<br>
f.children.data_bounds = [200,-180;2e4,180];<br>
<span>xset("fpf","%.0f"); // bug? not working for logarithmic axes...<br>
</span>cntcolorname = "grey"; // define contour color<br>
cntcolor = color(cntcolorname);<br>
cntcolor = repmat(cntcolor, 1, nz); // define array with as many colors as<br>
contours<br>
f.color_map = [f.color_map; name2rgb(cntcolorname)];<br>
contour2d(frequencies,angles,<wbr>magnitudes,zn,style=cntcolor,<wbr>logflag="ln");<br>
e = gce();<br>
N = length(e.children);<br>
for i = 1:nz-1<br>
e.children(i).children.line_<wbr>style = 2; // dashed contours<br>
end<br>
<br>
colorbar(min(magnitudes),max(<wbr>magnitudes),[1 nz2])<br>
<div class="HOEnZb"><div class="h5">xlabel("frequency [Hz]");<br>
ylabel("angle (deg)");<br>
//END OF CODE<br>
<br>
Regards,<br>
Rafael<br>
<br>
<br>
<br>
--<br>
Sent from: <a href="http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html" target="_blank" rel="noreferrer">http://mailinglists.scilab.<wbr>org/Scilab-users-Mailing-<wbr>Lists-Archives-f2602246.html</a><br>
______________________________<wbr>_________________<br>
users mailing list<br>
<a href="mailto:users@lists.scilab.org">users@lists.scilab.org</a><br>
<a href="http://lists.scilab.org/mailman/listinfo/users" target="_blank" rel="noreferrer">http://lists.scilab.org/<wbr>mailman/listinfo/users</a><br>
</div></div></blockquote></div><br></div>