<div dir="ltr"><div>Hi Rafael</div><div><br></div><div>Thank you very much for your kind help. The very detailed contourf works now. Also thanks for the tip with the colorbar - it looks great. I see how re-painting with contour2d brings back the contour lines. With the many colours in the colormap, all lines are blue, which is OK. :-) I guess the answer is I cannot use a different colormap (or any specific color) for these lines.</div><div><br></div><div>In the last example of contourf you see some black lines. The example shows how to remove the lines (the last few lines of code) and it appeasr that feeding a vector of zeros into contourf as the last input parameter turns these lines on. I wonder why the example uses 0*ones(m) and not simply zeros(m) ... there are so many strange things wtih example 3, and the learning curve is much too steep. Like I mentioned before, IMO example 3 is cryptic.</div><div><br></div><div>Again, Rafael, thank you for your kind help. I believe the plot is now how it should be.</div><div><br></div><div>Best regards,</div><div>Claus</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Sun, Jan 21, 2018 at 9:38 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>
Please check code below which produces the plot herein.<br>
Optionally you can add contours to it.<br>
However the contour level labels do not seem to display on such log-plots. A<br>
possible contour2d bug?<br>
<br>
<<a href="http://mailinglists.scilab.org/file/t495698/contourf_colorbar.gif" target="_blank" rel="noreferrer">http://mailinglists.scilab.<wbr>org/file/t495698/contourf_<wbr>colorbar.gif</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><span>nz = 40:10:90;<br>
</span>nz2 = 40:1:90;<br>
cplot = gcf();<br>
cplot.color_map= jetcolormap(length(nz2)); // blue = cold, red = hot :-)<br>
contour2d(frequencies,angles,<wbr>magnitudes,nz,logflag="ln");<br>
contourf(frequencies,angles,<wbr>magnitudes,nz2);<br>
cplot.children.data_bounds = [200,-180;2e4,180];<br>
// contour2d(frequencies,angles,<wbr>magnitudes,nz,logflag="ln"); // Optionally<br>
add contours<br>
// xset("fpf","%.0f"); // bug? not working for logarithmic axes...<br>
colorbar(min(magnitudes),max(<wbr>magnitudes))<br>
<span>xlabel("frequency [Hz]");<br>
ylabel("angle (deg)");<br>
//END OF CODE<br>
<br>
Regards,<br>
Rafael<br>
<br>
<br>
<br>
<br>
</span>--<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>
<div class="HOEnZb"><div class="h5">______________________________<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>