Re: GtkPlot with multiple datasets
James Steward <[email protected]> Fri, 28 Oct 2011 08:13:05 +1100
| Newsgroups | gmane.comp.scigraphica.gtkextra |
|---|---|
| Message-ID | <[email protected]> |
Luis A. Montes wrote: > I've been trying to use GtkExtra, specifically gtk plot to produce some > simple graphs. I have a single plot on a canvas, and then I add one > dataset. That seems to work. But when I add a second one using: > > pImpl->m_dataset[n] = GTK_PLOT_DATA(gtk_plot_data_new()); > gtk_plot_add_data(GTK_PLOT(pImpl->m_plot), pImpl->m_dataset[n]); > > and then I try to set a different symbol for the second one using: > > gtk_plot_data_set_symbol( > pImpl->m_dataset[n], symbol, GTK_PLOT_SYMBOL_OPAQUE, > 5, 1, > &pImpl->m_color[color_ndx],&pImpl->m_color[color_ndx] > ); > > It ends up using the same symbol for both. The odd part is that the > legend does show different symbols for each data set. It actually seems > as if the two datasets get spliced into one. I had a similar, perhaps related problem yesterday. I had one dataset with GTK_PLOT_CONNECT_STRAIGHT, then added a second dataset with GTK_PLOT_CONNECT_SPLINE and the second plot went weirdo (technical term for FUBAR). When I set both to SPLINE, I got; ERROR:gtkplotdata.c:5274:spline_eval: assertion failed: (h > 0.0) Yay. Regards, James. ------------------------------------------------------------------------------ The demand for IT networking professionals continues to grow, and the demand for specialized networking skills is growing even more rapidly. Take a complimentary Learning@Cisco Self-Assessment and learn about Cisco certifications, training, and career opportunities. http://p.sf.net/sfu/cisco-dev2dev