ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
I've never come across anything in ROS itself but assuming you've installed the rxtools
package (rx
stack) then you have matplotlib
installed since it's a dependency (used by rxplot
) and you can use its pyplot.hist command.
As for how to get the data to plot, there are lots of ways but you're looking for a quick, one-off solution you could use rosh
(you probably want to check this page for usage details). It could look something like this though:
# pop up a histogram of the field `bar` from the
# last 100 messages on the topic `foo`:
import matplotlib.pyplot as plt
import numpy as np
x = np.array([m.bar for m in topics.foo[:100]])
plt.hist(x)
plt.show()