Skip to content

Missing x axis labels for multiple line plot #104

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
sadielbartholomew opened this issue Apr 15, 2025 · 0 comments
Open

Missing x axis labels for multiple line plot #104

sadielbartholomew opened this issue Apr 15, 2025 · 0 comments
Assignees
Labels

Comments

@sadielbartholomew
Copy link
Member

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

@sadielbartholomew sadielbartholomew self-assigned this Apr 15, 2025
@sadielbartholomew sadielbartholomew changed the title Missing x axis labels for multi-line plot w/ non-overlapping ranges Missing x axis labels for multiple line plot Apr 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant