Skip to content
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

Can't find one or more curves #883

Open
wvanderp opened this issue Nov 8, 2023 · 0 comments
Open

Can't find one or more curves #883

wvanderp opened this issue Nov 8, 2023 · 0 comments

Comments

@wvanderp
Copy link

wvanderp commented Nov 8, 2023

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:

std::string curve_x = curve_element.attribute("curve_x").toStdString();
std::string curve_y = curve_element.attribute("curve_y").toStdString();
if (_mapped_data.numeric.find(curve_x) == _mapped_data.numeric.end() ||
_mapped_data.numeric.find(curve_y) == _mapped_data.numeric.end())
{
missing_curves.append(curve_name);
}

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

#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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant