0

So I have this function, func(a,x,y) where x,y are the graphs coordinates, and a some other data (it doesnt really matter what a is for this problem)

I want this function to make subplots automatically, so when the function is called and n number of times

func(a2,x2,y2)
func(a3,x3,y3)
func(a4,x4,y4)
.
.
func(an,xn,yn)

It should show n subplots on a graph

Note it is important that the function works in this way for my usecase, I dont want to be inputting an array of [a1,a2,...],[x1,x2,...],[y1,y2,...] and then plotting them all, I want to call each of the graph function seperately

user15032172
  • 55
  • 1
  • 6
  • what is your subplot definition? (rows? cols?) – armamut Jan 18 '21 at 19:19
  • 1
    and what have you tried? – armamut Jan 18 '21 at 19:19
  • Yes, you can resize the subplots after they are created, and make room for more of them. It'll be a bit of an accounting chore, but it is possible. There is no tool to do that with default matplotlib. Perhaps someone has written a toolbox to do that. – Jody Klymak Jan 18 '21 at 19:24
  • Welcome to SO! If you could provide a [minimal, reproducible example](https://stackoverflow.com/help/minimal-reproducible-example) by creating a small sample dataset (as shown in [this answer](https://stackoverflow.com/a/30424537/14148248) for example) and providing a plotting function and/or an image, it would help us a lot in answering your question. I think what you are wanting to do is quite feasible but I do not understand what the figure should look like and how exactly `a, x, y` are used to create the subplots. – Patrick FitzGerald Jan 22 '21 at 13:26

0 Answers0