Skip to content

Missing x axis labels for multiple line plot #104

@sadielbartholomew

Description

@sadielbartholomew

For a multiple line plot created in the standard means via calling cfp.lineplot more than once wrapped inside the gopen and gclose calls, where the lines to be plotted have ranges that don't overlap, the only x axis labels shown are the ones for the data from the final call.

We should make it default behaviour that the overall lineplot axis covers the full extent of all input data, without the user having to manually specify this (if that's even possible via cfplot configuration - I am yet to have time to investigate).

MRE

Adapted from a user report (from SG). To reproduce you need data files that contain the same variable with non-overlapping ranges of data, a common example being sequential time windows as here.

MRE code

cfp.gopen()

for file in files:
    c1 = cf.read(file)
    d1 = c1.select('ncvar%zostoga')[0]
    cfp.lineplot(d1)

cfp.gclose()

Output lineplot

Note the lack of x axis labelling for all but the final file variable data input:

Image

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions