PlotJuggler icon indicating copy to clipboard operation
PlotJuggler copied to clipboard

Can't find one or more curves

Open wvanderp opened this issue 1 year ago • 0 comments

Thanks for contributing to PlotJuggler. You are great!

Problem description

The style of prefixed XY curves can not be edited because they are not found.

Can't find one or more curves.
This message will be shown only once.

Debug steps

I've already done some digging and found the following:

https://github.com/facontidavide/PlotJuggler/blob/a123c36350b4ef116c7d76a79c16832eec6f9643/plotjuggler_app/plotwidget.cpp#L810-L816

On these lines, we search for the data to generate the curve on the edit screen.

When the curve is world/[siam,tre], then curve_x = siam and curve_y = tre, these will not be found in _mapped_data.numeric because all the values there have their full path. So, world/siam.

So, one solution could be to save curve_x and curve_y with their full path. Another is adding an attribute of the path to the curve_element and combining them on the fly.

I at first thought This would happen with all prefixed paths, but it seems to only happen with data loaded from CSV.

Steps to reproduce (important)

download csv_files.zip int there are two CSV files

  • drag both of them into plotjuggler
  • use the default suggested prefixes
  • create an XY plot from the data in the A prefix
  • the plot appears
  • right click and select Edit Curves...
  • an alarm is shown that says, Can't find one or more curves
  • and then you can't change the setting of the curve

here is a video of me doing it: https://github.com/facontidavide/PlotJuggler/assets/2423856/805bb81f-891c-412f-93ed-fddf52e18066

Related bug

https://github.com/facontidavide/PlotJuggler/issues/756 Layout doesn't restore XY plots when multiple sources with prefixes are used this bug seems related because it describes the same problem with the prefix and XY plots

wvanderp avatar Nov 08 '23 21:11 wvanderp