Menu

#12 Shared time axes in plots

Next_Release
open
nobody
None
1
2015-05-11
2015-05-11
No

It would be great if, in subplots, the time axes were shared by default, using the sharex kwarg, then all the x-axes would zoom together if zooming in one area, which I figures is what you typically want when examining results.

I already tried to to this with a quick fix, but it turns out that the plotting code should be switched to the pyplot object-oriented interface (i.e. using figure objects), and this was too complex for me. Probably easier for someone familiar with the code.

Relevant code in data_reporters.py L468:

fig, _ = plt.subplots(rows, cols, sharex=True)
for i, arg in enumerate(args):
    '''Loop over arguments: some are variables (each one gets its
    own subplot) and some are lists of variables, these vars
    will share a plot.'''
    axes = fig.add_subplot(rows, cols, i+1)

Versions: Windows 8.1, daetools-1.4.0-win32-py34, Python 3.4.2 32bit (Anaconda)

Discussion

Anonymous
Anonymous

Add attachments
Cancel





Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.