From: fred <far...@ya...> - 2005-05-20 17:35:53
|
--- Arjen Markus wrote: > I second Alan's advice, but I would like to know > what > makes you think that the code is too slow? After > all, > a single call to some more convenient PLplot routine > would have to go through the same loop and I do not > think that is going to be much more efficient - > unless wxWorks is doing an screen update with each > call to myPlot->poin() ... > > Regards, > > Arjen Thanks for the quick reply. Alan's suggestion does indeed work. For documentary completeness, wxPlot overrides plPlot->col, so that plPlot->col( PLINT ) => col0 and plPlot->col( PLFLT ) =>col1 As for the speed, I was expecting that a function call such as: myPlot->poin( NUM_POINTS, x, y, 1 ) would be faster than calling poin() individually on each point. I think that wxWidgets does do a screen update on each call to myPlot->poin(), and this slows things down a bit (I'm graphing ~O(10^5)). Nonetheless, the overhead is certainly acceptable for my purposes, if not ideal. Thanks again for the help. Sinerely, Fred Yahoo! Mail Stay connected, organized, and protected. Take the tour: http://tour.mail.yahoo.com/mailtour.html |