Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.graphics.apps.gnuplot > #4318

Re: How to draw polygon on contour plot

Newsgroups comp.graphics.apps.gnuplot
Date 2020-04-12 16:14 -0700
References <9f707fe3-4339-4485-a037-876d3d43e12e@googlegroups.com>
Message-ID <c9a259a7-8ed5-4d6f-ad6d-5e90de067f87@googlegroups.com> (permalink)
Subject Re: How to draw polygon on contour plot
From eridanibrew@gmail.com

Show all headers | View raw


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.

Back to comp.graphics.apps.gnuplot | Previous | NextPrevious in thread | Find similar


Thread

How to draw polygon on contour plot eridanibrew@gmail.com - 2020-04-09 21:14 -0700
  Re: How to draw polygon on contour plot eridanibrew@gmail.com - 2020-04-12 16:14 -0700

csiph-web