Ilya Zakharevich on Sat, 9 Oct 1999 15:00:25 -0400 |
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
Re: Update Gnuplot support to alpha 3.7.0.9 |
On Wed, Oct 06, 1999 at 08:44:47PM -0400, Ilya Zakharevich wrote: > I checked gnuplot support of Pari with soon-to-be-released gnuplot > 3.7.1, and of course a new development moved Gnuplot.h out of sync. Now I checked the current development release 3.7.0.9 too. The following patch is needed (this patch is to gnuplot-specific files only). Now with PM terminal (OS/2) you got a really interactive graphing: you can see x/y-coordinates corresponding to the mouse position, you can annotate graphs with the coordinates of particular points, you can save coordinates to clipboard etc. Enjoy, Ilya --- ./src/graph/Gnuplot.h-goodfor-3.7.1 Thu Oct 7 03:05:10 1999 +++ ./src/graph/Gnuplot.h Thu Oct 7 03:27:52 1999 @@ -159,6 +159,37 @@ TBOOLEAN is_3d_plot; /* End of 3.7.1 additions */ +/* 3.7.0-devel additions */ + +extern float surface_rot_z; +extern TBOOLEAN polar; +extern double base_log_x, base_log_y, base_log_z; +extern TBOOLEAN is_log_x, is_log_y, is_log_z; +extern double log_base_log_x2, log_base_log_y2; +extern double base_z; +extern TBOOLEAN screen_ok; + +float surface_rot_z = 30.0; +TBOOLEAN polar = 0; +TBOOLEAN is_log_x = 0; +TBOOLEAN is_log_y = 0; +TBOOLEAN is_log_z = 0; +double base_log_x = 0.0; +double base_log_y = 0.0; +double base_log_z = 0.0; +double log_base_log_x = 0.0; +double log_base_log_y = 0.0; +double log_base_log_z = 0.0; +double base_z = 0.0; +TBOOLEAN screen_ok; + +void map3d_xy (double x, double y, double z, unsigned int *xt, unsigned int *yt) +{ + croak("Unsupported function map3d_xy called"); +} + +/* End of 3.7.0-devel additions */ + /* Here are the only missing functions: */ struct value* --- ./src/graph/plotgnuplot.c-goodfor-3.7.1 Thu Oct 7 03:05:10 1999 +++ ./src/graph/plotgnuplot.c Thu Oct 7 14:47:18 1999 @@ -35,14 +35,6 @@ rectdraw0(long *w, long *x, long *y, lon PARI_get_plot(0); -#if 0 - graphics(); /* Switch on terminal. */ -#else - term_start_plot(); /* Switch on terminal. */ -#endif - linetype(line_type); /* X does not work otherwise. */ - setpointsize(pointsize); - /* Find the info about the *actual* x and y-coords of the rectangles. Use the first rectangle with has_graph attribute. */ @@ -74,6 +66,14 @@ rectdraw0(long *w, long *x, long *y, lon max_array[FIRST_Y_AXIS] = max_array[SECOND_Y_AXIS] = 0; } +#if 0 + graphics(); /* Switch on terminal. */ +#else + term_start_plot(); /* Switch on terminal. */ +#endif + linetype(line_type); /* X does not work otherwise. */ + setpointsize(pointsize); + for(i=0;i<lw;i++) { e=rectgraph[w[i]]; p1=RHead(e); x0=x[i]; y0=y[i];