Skip to content
Snippets Groups Projects

Only autoset ylim if not specified

Merged Sean Leavey requested to merge (removed):fix/ylim into master
1 unresolved thread

This fixes the behaviour where ylim is overwritten if specified in the kwargs of plot_noise().

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
64 65
65 66 ax.autoscale(enable=True, axis='y', tight=True)
66 67 if ylim:
67 68 ax.set_ylim(ylim)
  • @sean-leavey Is this not already handled down here? Wondering why this isn't working...

  • Author Contributor

    No because line 43 sets ylim even if it was None before. So line 66, if ylim:, is always True even if ylim is None during the method call.

    tbh, the logic here was already a bit confusing. Why is ylim, a variable that has apparently nothing to do with the 'Total' trace, being set in the if name == 'Total': block? Seems like a mistaken variable name or something...

  • Because the we wanted to set the default ylim based on the Total trace.

    I think your patch is the way to go. I'll merge.

  • Please register or sign in to reply
  • Please register or sign in to reply
    Loading