[Python] I want to plot a rectangle with given 4 coordinates in a text file in gnuplot. The...

Discussão em 'Python' iniciado por Stack, Abril 19, 2025.

  1. Stack

    Stack Membro Participativo

    How do I read the data from the file and plot the rectangle? The given text file has the following format up to 50 rows: x1 y1 x2 y2 x3 y3 x4 y4

    where (x1,y1), (x2,y2), (x3,y3) and (x4,y4) are the four vertices of the rectangle. The rectangles have random orientation. How do I plot the series of rectangles in gnuplot?

    If someone can tell me how to read from a file while using set object polygon, that may also be helpful what I want: set object polygon from to to to .

    Or, is there any other simpler code in gnuplot? Alternatively is there a python solution?

    Continue reading...

Compartilhe esta Página