3 from jsk_recognition_msgs.msg 
import PlotData
 
    7 from random 
import random
 
    9 if __name__ == 
"__main__":
 
   10     rospy.init_node(
"sample_2d_plot")
 
   11     pub = rospy.Publisher(
"~output", PlotData, queue_size=1)
 
   14     while not rospy.is_shutdown():
 
   16         msg.xs = np.arange(0, 5, 0.1)
 
   17         msg.ys = [math.sin(x + offset) 
for x 
in msg.xs]
 
   18         msg.label = 
"sample data" 
   20             msg.type = PlotData.LINE
 
   22             msg.type = PlotData.SCATTER
 
   23         msg.fit_line = random() < 0.5
 
   24         msg.fit_line_ransac = random() < 0.5