question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Plot Panel Y-limit bugs

See original GitHub issue

Description There are a few bugs in the Y-limits settings for Plot panels. I grouped them altogether in this issue but am happy to separate them if that would be better.

  • Version: 1.12.0
  • OS: Ubuntu 20.04
  • Data source (e.g. bag file, mcap file, rosbridge, ROS 1/2 native): Seems to be data source agnostic - I am able to replicate the issues even when not connected to a data source. For my example below I used a ROS 1 live connection.
  • ROS distro (if applicable): Noetic

Steps To Reproduce and Expected Behavior

  1. Create a new layout and add a Plot panel
  2. Plot something
  3. Open the panel settings and look at Y-min and Y-max.

Auto-scale

Expected result: I would’ve expected the defaults to be auto and auto, with the plot auto-scaling. Actual result: The plot is auto-scaling as expected, but the Y-min and Y-max are reading back 0 and 0 instead of auto and auto. This is confusing, especially because if you backspace the 0s they will turn to auto. Workaround: The only way to set an actual limit of 0 is to backspace the 0 and retype it in.

image

image

Negative values

  1. Now, in the Y-min box, backspace the 0 and attempt to type -10.

Expected result: As I type -10, it appears in the textbox, and the minimum on the plot goes to -10. Actual result: A - is not allowed in the textbox when the textbox is empty. Workaround: Type 10, and then move the cursor to the front to type the -. It seems to accept the - as long as the textbox already has other text in it and isn’t empty.

Reversed values

  1. Attempt to set the Y-min to 10 and the Y-max to -10 (using the above workaround to type the -). I’ve accidentally done this many times, reversing the Y-min and the Y-max (I think my brain wants to have the Y-max on the top because its setting the value for the top of the graph).

Expected result: Studio throws an error at me, because my Y-max is less than my Y-min. Or even better, Studio figures out that i just reversed them and plots [10, 10]. Actual result: Foxglove does figure out that I reversed them and plots [-10, 10], which is really helpful. However, for some reason it removes all the horizontal lines on my plot 😕 Workaround: Don’t mix up the Y-min and Y-max 😃 Now that I know what is going on its easy to workaround, but for awhile I wasn’t sure why all my horizontal lines were going away.

image

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
jackiescanloncommented, Jun 6, 2022

Yep, that makes sense to me. Just tested the latest merge, looks good. Thanks!

1reaction
foxymilescommented, May 24, 2022

Thanks very much for the detailed bug report!

I’ve merged a patch that I think should fix this. Let me know if you’re still having issues.

Read more comments on GitHub >

github_iconTop Results From Across the Web

how to add x-axis and y-axis limits(like xlim and ylim ... - GitHub
Method mpf.plot() accepts kwargs xlim= and ylim= where the value must be a len=2 tuple (min,max).
Read more >
pairs(): different ylim , xlim for upper.panel and lower.panel?
Dear all, I am trying to create pairs plots with two different panel functions creating MvA and XY scatterplots, respectively. In this context...
Read more >
is there any way to change y axis scale in gui panel(or figure)
In the figure window go to 'EDIT' -> 'Axis Properties'. From there the window should reopen with a bunch of new setting options....
Read more >
plotrix: Various Plotting Functions
ylim. Optional y limits for the plot, usually necessary for counts. ... Split the graphics device into a "panel" type layout for a...
Read more >
Strange legend behavior(/bug) for same labeled plots in an ...
Dear holoviews developers and community, thanks a lot for this awesome package. I have a question regarding legends of similarly labeled ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found