Skip to content

Plotting using subplots #3964

Closed
Closed
@michaelaye

Description

@michaelaye

I am creating the attached plot like this:

fig, axes = subplots(3,3, sharex=True, sharey=True)
for ch in range(1,7):
    axis = axes.flatten()[ch-1]
    cols = some code to map ch to col_names
    df[cols].plot(ax=axis)
# do the same for 3 more channels with different IDs
for ch in range(1,4):
    axis = axes.flatten()[ch-1+6]
    cols = some code to map ch to col_names, slightly different to above
    df[cols].plot(ax=axis)

I have 2 problems with the result:

  1. sharex does not seem to work for time axes
  2. The last major x-ticklabel of the last row of axes is 10:00, while for the first 2 rows it is 9:00. I confirmed that all columns have data in the last row (index = 2011-04-02 10:00:00.718000) and not NaN which would have been excluded in the plot, potentially.

Possibly the 2 probs are related?

all_thermal_channels

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions