You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
editing output of scanpy dotplot and other figures #979
In the scanpy documentation for sc.pl.dotplot, it indicates that it returns a list of matplotlib.axes.Axes
However, this is not true, it returns a gridspec object instead.
I noticed this because I wanted to make some subtle edits to the results to enhance the figure such as changing axis labels, adding overlapping lines to delineate the marker genes for each cell type, etc. But I am struggling to do so.
I am wondering how the API intends for us to interact with the gridspec object returned to modify the figure. If I edit the code to return the figure object as well as the gridspec, I can access the axis like so
ax = fig.add_subplot(gs[1,0])
but I can't seem to overwrite the default axis labels or add new lines as commands like
ax.set_ylabel('new label')
Don't change the figure at all.
This is all Scanpy 1.4.5.post1 but it was the same for 1.4.4.post1
Activity
atarashansky commentedon Feb 21, 2020
Just opened a PR to fix this. Quoting from the PR (#1069):
improvements on plotting functions that use 'groupby' (#1210)