![]() The function would then return, I guess, the grid object? This seems to be how seaborn does it for a similar use-case, and they seem pretty on-the-ball. This seems generally desirable, but maybe there are use cases where it would not be helpful. sharex,sharey=True: subplot axis coupling.I think most people would expect vertical packing as i’ve done in this example, but it should be configurable. wspace,hspace=0: spacing between subplots. ![]() Some parameters we should expose (with defaults): This approach would easily generalize to C>2 channels, though if we have higher order arrangements we might get into trouble and have to flatten the array down in advance. (Side note: maybe waveshow and specshow should have options to not set axis labels.) We also have to do a little bit of cleanup here to hide the xlabel and ticks. I think this is fine, and we can still accept fig as a target or create a new one as needed. Note that this code would break the current pattern of display functions accepting target axes, since it will need to create an axes for each channel. ![]() Which produces the following image with the trumpet example: Grid = fig.add_gridspec(2, 1, wspace=0, hspace=0)Īxes = grid.subplots(sharex=True, sharey=True) Here’s some prototype code that does this already: fig = plt.figure(figsize=(10, 5), constrained_layout=False) In the common case of 2-channel signals, I think it would be helpful to have a plot that renders a joined pair of subplots with one channel each and shared axes, like you might see in a DAW. ![]() This is easiest to consider starting from wave plots. However, this doesn’t rule out the possibility of adding new functionality to support multichannel visualizations easily, and I think this would be quite helpful in general. We’ve previously decided that #1130 does not directly include modifications to the display module, and that those functions should remain mono-only.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |