-1

I'm using Python, and I have some data which can be projected on to points within an equilateral triangle whose side lengths sum to 1.

I'm not sure if there is an easy way to visualise a plot like this from Matplotlib or similar libraries, or if I'm just going to have to use a drawing package from scratch to make it happen. Any pointers gratefully recieved. Thanks!

  • Do have any mock data? also what have u tried so far – mpx Jul 02 '21 at 12:24
  • The mock data would literally be numeric triples with values on the interval (0,1], reflecting how far along each side of a particular triangle the points are. Haven't tried anything yet as I'm still processing the main body of the data. I just thought it was such an obvious thing to want to do that there might already be stuff out there for it. – Matt Bright Jul 02 '21 at 18:23

1 Answers1

0

If all you want to do is plot a few dots on a graph, you can infact use Matfplotlib's scatter plots for this: https://matplotlib.org/stable/api/_as_gen/matplotlib.pyplot.scatter.html

Using plt.xlim(*min*, *max*) and plt.ylim(*min*, *max*), you can set the limits of the graph manually to fit your values (might not be neccessary though).

You can draw lines on the graph for the triangle shape (if you need that): How to draw a line with matplotlib?

If you don't need a scale, you can even remove that to have a blank canvas: Matplotlib plots: removing axis, legends and white spaces

elsholz
  • 36
  • 2