I started with matplot and managed some basic plots, but now it's hard for me to figure out how to do some of the things I need now :(
My question is how to put a global heading and a global legend on a figure with subtitles.
I make 2x3 subnets, where I have many different graphs in different colors (about 200). To distinguish (most) of them, I wrote something like
def style(i, total): return dict(color=jet(i/total), linestyle=["-", "--", "-.", ":"][i%4], marker=["+", "*", "1", "2", "3", "4", "s"][i%7]) fig=plt.figure() p0=fig.add_subplot(321) for i, y in enumerate(data): p0.plot(x, trans0(y), "-", label=i, **style(i, total)) # and more subplots with other transN functions
(any thoughts on this? :)) Each subplot has the same style function.
Now I am trying to get a global heading for all the subplots, as well as a global legend that explains all the styles. I also need to make the font tiny so that it matches all 200 styles (I don't need completely unique styles, but at least some attempts)
Can someone help me solve this problem?
matplotlib title legend subplot
Gerenuk Sep 23 2018-11-11T00: 00Z
source share