I draw data as described in a previous Stackoverflow question: A gnuplot 2D plot with a heat map from a 3D dataset - maybe? It basically works well for me, and I bring it to the little details. One such way is to control the colors of the outline line and the line widths. There are many reports on the Internet about using set style increment user , followed by defining a user's style through set style line 1 lc rgb "blue" lw 2 , etc. Theoretically, this was supposed to make splot build storylines using new defined styles. I tried and it didn't work. Also, when I went to the help pages through my gnuplot installation, I found that this use was deprecated with my version (version 4.7 patchlevel 0 of the latest modification 2013-07-25). Instead, it was recommended that you use the specified line type, which constantly changes the gnuplot line style characteristics for the current gnuplot call. Killing and restarting gnuplot restores the default line type characteristics.
Then I restarted gnuplot, restored the chart without overriding any line style or type for contour lines. When I looked at my plot, I saw that the colors of the lines begin with cyan, then magenta, then blue (for example, the type of lines 5,4,3 or 14,13,12, etc.). It seems that line types go BACKWARDS through the available styles. Well, I thought, I can just change them and live with odd behavior. However, after issuing several line set commands that changed all of these line types to something that would be clearly different (I checked them by running the test command, the contour lines on the chart still had the same color and line width as Before, I cannot understand what type of lines is used for contour lines, so I cannot change the corresponding type of line.
Perhaps this odd behavior is the result of the contour line being of the type set cntrparam levels increment -6,-6,-24 , and negative values and / or negative incremental increment cause some unpredictable behavior?
I would like to know how I can find out what type of lines will be used for contour lines in this graph, and whether it will change if the number of lines used to construct the surface change changes. For example, the graph shown below uses 13 “lines” to generate a surface using the set pm3d map . So, let N = 13 lines - is there a rule that holds for the first type of line contour ?. For example, will I always be sure that the outline line style starts with N = 14? I would like to know what type of line will be used for the first and subsequent contour lines, when the number of “lines” in my input will change.
The bottom line is that I need to apply a certain style to the contour lines used for each level of the contour. I want to consistently use the same style for each level when changing the input. The plot will always use the same set of contour levels: -6, -12, -18 and -24. The chart data will always have a maximum "z" coordinate of about 0 and decrease from there.
Gnuplot commands are shown below. The dataset for this story can be downloaded here: http://audio.claub.net/temp/new_test.dat
reset set terminal pngcairo size 800,800 set output '3d-polar.png' set lmargin at screen 0.05 set rmargin at screen 0.85 set bmargin at screen 0.1 set tmargin at screen 0.9 set pm3d map interpolate 20,20 unset key set multiplot # plot the heatmap set cntrparam bspline set cntrparam points 10 set cntrparam levels increment -6,-6,-24 set contour surface #set style increment user #NOTE: the commented out lines do not seem to affect color or width of the the contour lines no matter what number I use for the linetype #set linetype 8 lc rgb "blue" lw 2 #set linetype 9 lc rgb "black" lw 1 #set linetype 10 lc rgb "orange" lw 1 #set linetype 11 lc rgb "yellow" lw 1 set palette rgb 33,13,10 #rainbow (blue-green-yellow-red) set cbrange [-18:0] unset border unset xtics unset ytics set angles degree r = 3.31 #This number is Log10(max frequency) - Log10(min frequency) of the polar frequency grid set xrange[-r:r] set yrange[-r:r] set colorbox user origin 0.9,0.1 size 0.03,0.8 splot 'new_test.dat' # now plot the polar grid only set style line 11 lc rgb 'black' lw 2 lt 0 set grid polar ls 11 set polar set logscale r 10 set rrange[10:20000] unset raxis set rtics format '' scale 0 #set rtics axis scale set rtics (20,50,100,200,500,1000,2000,5000,10000,20000) do for [i=-150:180:30] { dum = r+0.15+0.05*int(abs(i/100))+0.05*int(abs(i/140))-0.05/abs(i+1) set label i/30+6 at first dum*cos(i), first dum*sin(i) center sprintf('%d', i) } set label 20 at first 0, first -(log(20)/log(10)-1) center "20" set label 100 at first 0, first -(log(100)/log(10)-1) center "100" set label 200 at first 0, first -(log(200)/log(10)-1) center "200" set label 1000 at first 0, first -(log(1000)/log(10)-1) center "1k" set label 2000 at first 0, first -(log(2000)/log(10)-1) center "2k" set label 10000 at first 0, first -(log(10000)/log(10)-1) center "10k" set label 20000 at first 0, first -(log(20000)/log(10)-1) center "20k" plot NaN wl unset multiplot unset output
A graph without control over contour lines is shown below. I need to specify the color and line width for contour lines. How?
