Shared time axes in plots
Object-oriented equation-based modelling and optimisation software
Brought to you by:
ciroki
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)
Anonymous