• How to draw polygon on contour plot

    From eridanibrew@gmail.com@21:1/5 to All on Thu Apr 9 21:14:30 2020
    I would like to draw a polygon on "top of" a contour plot. My code sample below "almost" gets there; I can see the polygon lines around the edges of the plot, but not the diagonal lines connecting the edge lines. The only reason I can see the edge lines
    is because I plotted with a line width of 5. The contour coloring seems to cover the diagonal lines.

    I don't see a way to attach an image to my post to show the problem in the resulting plot:(


    [code]
    f="PlywoodSpace.csv"
    reset
    set term windows size 800,1100
    set pm3d

    set dgrid3d
    unset surface # don't need surfaces
    set view map
    set contour
    set key outside
    set cntrparam cubicspline # smooth out the lines
    set cntrparam levels 50 # 50 sets the num of contour lines
    set pm3d interpolate 20,20 # interpolate the color
    # Set a nice color palette
    set palette model RGB defined ( 0"black", 1"blue", 2"purple", 3"cyan", 4"green", 5"yellow", 6"red", 7"white" )
    set title "Plywood"

    # draw a paddle
    set object 1 polygon from -2.5,-4,99 to -3,-3,99 to -3,4,99 to -2.5,5,99 to 2.5,5,99 to 3,4,99 to 3,-3,99 to 2.5,-4,99 lw 5 fc rgb "red"

    # Axes
    set tics scale 1,0.2
    set format z '%.0f'
    unset xtics
    unset ytics

    # Now plot
    splot f using 1:2:3 notitle with lines lt 1

    [/code]

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From eridanibrew@gmail.com@21:1/5 to erida...@gmail.com on Sun Apr 12 16:14:00 2020
    On Thursday, April 9, 2020 at 9:14:32 PM UTC-7, erida...@gmail.com wrote:
    I would like to draw a polygon on "top of" a contour plot. My code sample below "almost" gets there; I can see the polygon lines around the edges of the plot, but not the diagonal lines connecting the edge lines. The only reason I can see the edge
    lines is because I plotted with a line width of 5. The contour coloring seems to cover the diagonal lines.

    I don't see a way to attach an image to my post to show the problem in the resulting plot:(


    [code]
    f="PlywoodSpace.csv"
    reset
    set term windows size 800,1100
    set pm3d

    set dgrid3d
    unset surface # don't need surfaces
    set view map
    set contour
    set key outside
    set cntrparam cubicspline # smooth out the lines
    set cntrparam levels 50 # 50 sets the num of contour lines
    set pm3d interpolate 20,20 # interpolate the color
    # Set a nice color palette
    set palette model RGB defined ( 0"black", 1"blue", 2"purple", 3"cyan", 4"green", 5"yellow", 6"red", 7"white" )
    set title "Plywood"

    # draw a paddle
    set object 1 polygon from -2.5,-4,99 to -3,-3,99 to -3,4,99 to -2.5,5,99 to 2.5,5,99 to 3,4,99 to 3,-3,99 to 2.5,-4,99 lw 5 fc rgb "red"

    # Axes
    set tics scale 1,0.2
    set format z '%.0f'
    unset xtics
    unset ytics

    # Now plot
    splot f using 1:2:3 notitle with lines lt 1

    [/code]

    Tried a million differrent things to try and get the polygon object to show up on top. Finally figured out to
    do splot
    now define the object polygon with "front"
    replot

    Now the object shows up higher than than the contour.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)