How to draw a rectangular region with Plots.jl?

Just after writing here, I finally found out, what was what in general. In case anybody aver wonders this as well, I’ll add a small explanation:

Shape([x-value-corner1, x-value-corner2, x-value-corner3, x-value-corner4, …], [y-value-corner1, y-value-corner2, y-value-corner3, y-value-corner4, …])

So, to get a trapezoid, the code would be something like this:

plot(Shape([25, 425, 425, 25], [-1, -5.24, 5.24, 1]))

ultimatley giving the four corners of the trapezoid the coordinates

  • x= 25, y= -1
  • x= 425, y= -5.24,
  • x=425, y= 5.24,
  • x=25, y=5.24

I hope,this helps anybody stumbling across the same problem :slight_smile:

8 Likes