Hi Rafale Thanks for your kind help. I see how a carefully selected nz controls the plot.
Actually my data set is much larger. If we look at the magnitudes, they go from 42 to 92 (in the big data from 28 to 94) dB. If I could make a very beautiful color map of 94-28 = 66 different colors, that would be excellent. My experiments show that with jetcolormap it makes sense to have 10. So 10 it is. If the lines then only go from black to yellow, so be it ... but if they could be black (or better - white - which will show very clearly in the map), it would be better. I look at the examples in the contourf ... and the last example shows many gradients from yellow to red + some black dash-dotted contour lines. My only problem is that this example is not well documented (there's essentially no explanation at all). Looking at the parameters is cryptic. https://help.scilab.org/docs/6.0.0/en_US/contourf.html P.S. Yes, I add xlabel and ylabel. :-) ... Good idea. Best regards, Claus On Sun, Jan 21, 2018 at 5:01 PM, Rafael Guerra <[email protected]> wrote: > Hi Claus, > > > > Pls check if this solution is satisfactory: > > > > *//START OF CODE* > > frequencies = [200 2000 20000]; *// Hz* > > angles = [0 30 60 90 120 150 180]; *// degrees - convert to radians!* > > mag00 = [69.253448 92.163385 87.414209]; *// on-axis freq-response* > > mag30 = [68.461357 90.569082 76.073549]; > > mag60 = [65.842262 90.745621 74.152067]; > > mag90 = [59.420658 80.893365 55.975304]; > > mag120 = [52.505173 80.795915 44.363582]; > > mag150 = [53.829987 59.793715 42.443964]; > > mag180 = [55.650341 73.457973 55.608187]; > > > > magnitudes = [mag00' mag30' mag60' mag90' mag120' mag150' mag180']; > > > > negative_angles = -angles(2:7); > > neg_angle_magnitudes = magnitudes(:,2:7); > > angles = [angles negative_angles]; > > magnitudes = [magnitudes neg_angle_magnitudes]; > > [angles idx] = gsort(angles,'g','i'); > > magnitudes = magnitudes(:,idx); > > > > *clf*; > > contourplt = *scf*(); > > contourplt.color_map=*jetcolormap*(6); *// blue = cold, red = hot :-)* > > nz = 40:10:90; > > *contour2d*(frequencies,angles,magnitudes,nz,logflag="ln"); > > *contourf*(frequencies,angles,magnitudes,nz); > > *legends*(string(nz),1:length(nz),"lr"); > > *xlabel*("frequency [Hz]"); > > *ylabel*("angle (deg)"); > > *//END OF CODE* > > > > Regards, > > Rafael > > > > > > _______________________________________________ > users mailing list > [email protected] > http://lists.scilab.org/mailman/listinfo/users > >
_______________________________________________ users mailing list [email protected] http://lists.scilab.org/mailman/listinfo/users
