EMAworkbench
EMAworkbench copied to clipboard
Allow changing the figure size of a `parcoords.ParallelAxes()` plot
Currently for a parcoords.ParallelAxes()
you can change the number format, fontsize and label rotation, but not the figure size (or aspect ratio). If you have many variables this can be desirable.
A maybe even broader approach to this issue would be returning a matplotlib.pyplot.figure
instead of a NoneType
when calling ParallelAxes.plot()
, for which you can change it's size and other aspects afterwards (with Figure.set_size_inches()
).
I agree, returning the figure is the obvious fix.
In the meantime, you can use plt.gcf()
to get it.
I was just checking the code. parcoords.ParallelAxes()
is a class and fig
is one of its attributes. So in principle, there is no need to have ParallelAxes.plot()
return the figure because you already have it as an attribute on ParallelAxes.
If true, then this is more a matter of properly documenting the attributes of parcoords.ParallelAxes()
.
if instead, you want to maintain behavior similar to plt.plot()
, you would have to return the Line2D
instances rather than the figure.
I still aim to do a deep dive into plotting at some point, but I don't think that will happen before the 2.3.0 release. I would suggest moving this to 2.4.0.