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

Make a plot only with recent data #22

Open
vik748 opened this issue Nov 16, 2017 · 4 comments
Open

Make a plot only with recent data #22

vik748 opened this issue Nov 16, 2017 · 4 comments

Comments

@vik748
Copy link

vik748 commented Nov 16, 2017

Hi,
I am trying to use multiplot to plot odom x vs odom y (which I have converted from lat/long to UTM). In the plot I want to be able to see the most recent point (or points). I tried to accomplish this by adding 2 curves, one with the data being a vector and a 2nd curve for the recent points. For the 2nd curve I have tried using circular buffer with low capacities and time frames of 1-5 secs. In the plot I can get the desired behavior for a few secs after which the 2nd plot keeps the full track. If I clear the plots I can get the behavior for a few secs again.
Is this the correct way of achieving the desired behavior or is there a better way?

@samuelba
Copy link
Contributor

Hi @vik748
This behavior should be achievable with the circular buffer you mentioned. "Time frame" doesn't work in your case, since you would have to plot a timestamp on the x-axis.

@vik748
Copy link
Author

vik748 commented Jan 17, 2018

@samuelba I was able to achieve it, but as I mentioned earlier it works for a few secs and then breaks. After a few secs the “circular buffer” plot starts tracking the whole data set.

@ckurtz22
Copy link

ckurtz22 commented Apr 30, 2019

Similar to @vik748 , when I try to use circular data it just does not seem to work at all on Melodic. Maybe I am understanding it wrong, but I would expect that if I have the circular data buffer set to 10, then after 10 points are added to the graph (i.e. 10 messages on the topic), then the graph will start overwriting the beginning points?

Ideally for me I would like to be able to have it so if a data point with an identical X value to a previous data point is received, it removes the previous point and replaces it with the new point

@henryliuliuliu
Copy link

how can use it like the rqt_plot, if i want to subscribe some topics and draw its data?

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

No branches or pull requests

4 participants