Menu

#1610 Number of contour levels doesn't always match "set cntrparam levels"

None
closed-invalid
None
2015-05-06
2015-05-05
Dan Sebald
No

Most recent CVS version

I was testing contour behavior for multiple curves and ran into the following behavior, which doesn't seem correct:

set contour base
set title "2 surfaces"
set key opaque
set cntrparam levels 0
splot x3*y2

[I see one level...can't have less than 1, fine.]

set cntrparam levels 1
replot

[Same plot, one level. Good.]

set cntrparam levels 2
replot

[Two levels. Good.]

set cntrparam levels 3
replot

[Two levels. Not good?]

set cntrparam levels 4
replot

[Four levels. Good.]

set cntrparam levels 5
replot

[Four levels. Not good?]

set cntrparam levels 6
replot

[Four levels. Not changing.]

set cntrparam levels 7
replot

[Four levels.]

set cntrparam levels 8
replot

[Four levels.]

set cntrparam levels 9
replot

[Four levels.]

set cntrparam levels 10
replot

[10 levels! Back to good.]

set cntrparam levels 11
replot

[10 levels. Not good.]

[Keep going all the way to 19 and the levels stay at 10.]

set cntrparam levels 20
replot

[20 levels! Back to good.]

Discussion

  • Dan Sebald

    Dan Sebald - 2015-05-05

    The plot line should be

    splot x**3*y**2
    

    I.e.,

    set contour base
    set title "2 surfaces"
    set key opaque
    set cntrparam levels 0
    splot x**3*y**2
    
     
  • Hans-Bernhard Broeker

    I'm afraid you're suffering from a misconception, caused by not reading enough documentation. Let me quote "help cntrparam" (with a little emphasis added by me)

    For auto, <n> specifies a nominal number of levels; the actual number will be
    adjusted
    to give simple labels. If the surface is bounded by zmin and zmax, contours
    will be generated at integer multiples of dz between zmin and zmax, where dz is
    1, 2, or 5 times some power of ten (like the step between two tic marks). </n>

     
  • Hans-Bernhard Broeker

    • status: open --> closed-invalid
    • assigned_to: Hans-Bernhard Broeker
    • Group: -->
    • Priority: -->
     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.