Ask Your Question

Only QwtPlot working. No graph in PyQtGraph and MatPlot

asked 2014-05-31 03:54:02 -0500

eirikaso gravatar image

Hi I am trying to plot my data and are having some trouble. The problem is that only QwtPlot is able to plot my data. I like PyQtGraph the best so i would like to use this. At first glance it looks like it doesn't receive any data, but when i look at the Y-axis it autoscrolls according to the data on the topic. The X-axis is not moving thou.

I am able to plot other topics with both PyQtGraph and MatPlot, so this is an event only occuring when plotting this topic.

This is the message I am sending:

Header header

string[] name float64[] position float64[] velocity float64[] effort

I am trying to get the position on the plot.

Does anyone know what I'm doing wrong here?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2014-05-31 07:15:32 -0500

ahendrix gravatar image

Do the messages you're sending have the timestamp in the header set properly?

The matplotlib and pyqtgraph plots use the timestamps for the X axis, and the qwtplot plots only use the received message order.

edit flag offensive delete link more


Probably not. How do I do that?

eirikaso gravatar image eirikaso  ( 2014-05-31 08:26:53 -0500 )edit

Before you publish your message, just do

msg.header.stamp = ros::Time::now();
in C++ or
msg.header.stamp =
in python.

ahendrix gravatar image ahendrix  ( 2014-05-31 08:38:55 -0500 )edit

NICE. Thanks :D

eirikaso gravatar image eirikaso  ( 2014-05-31 11:37:03 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2014-05-31 03:54:02 -0500

Seen: 643 times

Last updated: May 31 '14