Hi Mark,

just because I was curious I wrote a little program, which does some
easy calculation and plots 1000 graphs. On Windows (Pentium M 1733Mhz) I
achieved framerates from 280FPS (wxWidgets driver) to 530 FPS (wingcc)
driver (using -drvopt text=0 to disable antialized text). The xwin
driver might even be faster on Linux. Anyway, as long as you don't have
surface plots, I can't see any problems even for complicated lineplots.

So to answer your question - plplot performance should be good enough
for 5Hz plots.

HTH,
Werner


#include <time.h>
#include <math.h>

#include "plplot.h"

#define PC_e        1.60217653e-19           /* elementary charge e [C] */
#define PC_me       9.1093826e-31            /* mass of electron me [kg] */

#define NP 1001 /* number of points */
#define MAX(a, b) ((a)<(b)?(b):(a))
#define MIN(a, b) ((a)<(b)?(a):(b))

int main( int argc, char *argv[] )
{
   PLFLT x[NP], y[NP];
   PLFLT xmin, xmax;
   PLFLT ymin=1e30, ymax=1e-30;
   PLFLT r_c;
   size_t i,counter;
   clock_t watch;
   float duration;

   plparseopts( &argc, argv, PL_PARSE_FULL );
   plinit();
   plspause(0);

   watch=clock();
   for(counter=0; counter<1000; counter++) {
     xmin=0.0001;
     xmax=0.0020+counter/50.0;
     r_c=0.02;  /* maximum cyclotron radius */
     for( i=0; i<NP; i++ ) {
       x[i] = (xmax-xmin)*i/NP+xmin;
       y[i] = (pow(x[i]*PC_e*r_c, 2.0)/2.0/PC_me)/PC_e;
       ymin=MIN( ymin, y[i] );
       ymax=MAX( ymax, y[i] );
     }

     plcol0( 1 );
     plenv( xmin, xmax, ymin, ymax, 0, 0 );
     plcol0( 2 );
     pllab( "Magnetic field [T]", "Energy [eV]", "Energy Range");

     plcol0( 3 );
     plline( NP, x, y );
   }
   duration=(float)(clock()-watch)/CLOCKS_PER_SEC;
   printf("%f sec, FPS %f\n", duration, 1000.0/duration );

   /* Don't forget to call plend() to finish off! */
   plend();
   exit(0);
}



Mark Wilson wrote:
> Hello,
> 
> We need to update a graph at about a 5Hz rate, and the
> plplot canvas doesn't seem able to keep up with that
> (takes 200 to 300 ms to update graph). I'm wondering if
> this is something to be expected, or if we're doing
> something wrong (I don't expect anyone to tell me what I
> may or may not be doing wrong, I'm just looking for
> general info on performance).
> 
> Thanks,
> Mark
> 
> -------------------------------------------------------------------------
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share your
> opinions on IT & business topics through brief surveys - and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> _______________________________________________
> Plplot-general mailing list
> Plplot-general@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/plplot-general


-- 
Dipl. Ing. Werner Smekal
Institut fuer Allgemeine Physik
Technische Universitaet Wien
Wiedner Hauptstr 8-10
A-1040 Wien
Austria

email: [EMAIL PROTECTED]
web:   http://www.iap.tuwien.ac.at/~smekal
phone: +43-(0)1-58801-13463 (office)
        +43-(0)1-58801-13469 (laboratory)
fax:   +43-(0)1-58801-13499

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Plplot-general mailing list
Plplot-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-general

Reply via email to