| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent e0face0 commit 98702c9
10 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,3 +1,15 @@ | |||
| 1 | + 2000-06-04 Johannes Zellner <johannes@zellner.org> | ||
| 2 | + | ||
| 3 | + * included the supported terminals for pm3d to gnuplot.doc | ||
| 4 | + | ||
| 5 | + 2000-05-31 Petr Mikulik <mikulik@physics.muni.cz> | ||
| 6 | + | ||
| 7 | + * Ignore `replot` command called from mouse/hotkey-event-enhanced | ||
| 8 | + terminal when some plot data were piped in gnuplot via stdin --- | ||
| 9 | + i.e., no mouse replot after `plot '-'`). See also "no replot after | ||
| 10 | + `plot '-'`" discussion in the gnuplot-beta newsgroup. | ||
| 11 | + New variables: plotted_data_from_stdin, replot_disabled. | ||
| 12 | + | ||
| 1 | 13 | 2000-05-25 Petr Mikulik <mikulik@physics.muni.cz> | |
| 2 | 14 | * pm3d: support for pm3d functionality in 'pslatex / pstex' terminals | |
| 3 | 15 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,4 +1,4 @@ | |||
| 1 | - C RCS $Id: gnuplot.doc,v 1.40.2.4 2000/05/25 07:35:09 mikulik Exp $ | ||
| 1 | + C RCS $Id: gnuplot.doc,v 1.40.2.5 2000/06/04 12:53:19 joze Exp $ | ||
| 2 | 2 | C 3 December 1998 | |
| 3 | 3 | C Copyright (C) 1986 - 1993, 1998 Thomas Williams, Colin Kelley | |
| 4 | 4 | C | |
@@ -5235,7 +5235,15 @@ C ... and restart the table: | |||
| 5235 | 5235 | The main power of the pm3d algorithm (see also my program pm3d) is that | |
| 5236 | 5236 | it can draw maps or surfaces from large data sets without preprocessing even | |
| 5237 | 5237 | when the data are non-gridded and the scans do not have same number of | |
| 5238 | - points---thus it produces no artefacts. | ||
| 5238 | + points---thus it produces no artefacts. Currently supported terminals are: | ||
| 5239 | + | ||
| 5240 | + OS/2 Presentation Manager | ||
| 5241 | + X11 | ||
| 5242 | + Linux VGA | ||
| 5243 | + PostScript | ||
| 5244 | + pslatex, pstex | ||
| 5245 | + GIF | ||
| 5246 | + Xfig | ||
| 5239 | 5247 | ||
| 5240 | 5248 | The pm3d algorithm fills the region between two neighbouring points in one | |
| 5241 | 5249 | scan with another two points in the next scan by a gray (or colour) according | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,5 +1,5 @@ | |||
| 1 | 1 | #ifndef lint | |
| 2 | - static char *RCSid() { return RCSid("$Id: command.c,v 1.38.2.2 2000/05/16 11:26:40 joze Exp $"); } | ||
| 2 | + static char *RCSid() { return RCSid("$Id: command.c,v 1.38.2.3 2000/06/04 12:53:20 joze Exp $"); } | ||
| 3 | 3 | #endif | |
| 4 | 4 | ||
| 5 | 5 | /* GNUPLOT - command.c */ | |
@@ -414,6 +414,24 @@ char *s; | |||
| 414 | 414 | input_line=orig_input_line; | |
| 415 | 415 | } | |
| 416 | 416 | ||
| 417 | + void | ||
| 418 | + do_string_replot(s) | ||
| 419 | + char *s; | ||
| 420 | + { | ||
| 421 | + char *orig_input_line; | ||
| 422 | + static char buf[256]; | ||
| 423 | + | ||
| 424 | + orig_input_line = input_line; | ||
| 425 | + input_line = buf; | ||
| 426 | + strcpy(buf,s); | ||
| 427 | + if (!replot_disabled) | ||
| 428 | + strcat(buf,"; replot"); | ||
| 429 | + if (display_ipc_commands()) | ||
| 430 | + fprintf(stderr, "%s\n", buf); | ||
| 431 | + do_line(); | ||
| 432 | + input_line = orig_input_line; | ||
| 433 | + } | ||
| 434 | + | ||
| 417 | 435 | void | |
| 418 | 436 | restore_prompt(void) | |
| 419 | 437 | { | |
@@ -958,6 +976,7 @@ void | |||
| 958 | 976 | plot_command() | |
| 959 | 977 | { | |
| 960 | 978 | plot_token = c_token++; | |
| 979 | + plotted_data_from_stdin = 0; | ||
| 961 | 980 | SET_CURSOR_WAIT; | |
| 962 | 981 | #ifdef USE_MOUSE | |
| 963 | 982 | plot_mode(MODE_PLOT); | |
@@ -1022,6 +1041,18 @@ replot_command() | |||
| 1022 | 1041 | { | |
| 1023 | 1042 | if (!*replot_line) | |
| 1024 | 1043 | int_error(c_token, "no previous plot"); | |
| 1044 | + /* Disable replot for some reason; currently used by the mouse/hotkey | ||
| 1045 | + capable terminals to avoid replotting when some data come from stdin, | ||
| 1046 | + i.e. when plotted_data_from_stdin==1 after plot "-". | ||
| 1047 | + */ | ||
| 1048 | + if (replot_disabled) { | ||
| 1049 | + replot_disabled = 0; | ||
| 1050 | + #if 1 | ||
| 1051 | + bail_to_command_line(); /* be silent --- don't mess the screen */ | ||
| 1052 | + #else | ||
| 1053 | + int_error(c_token, "cannot replot data coming from stdin"); | ||
| 1054 | + #endif | ||
| 1055 | + } | ||
| 1025 | 1056 | c_token++; | |
| 1026 | 1057 | SET_CURSOR_WAIT; | |
| 1027 | 1058 | replotrequest(); | |
@@ -1126,6 +1157,7 @@ void | |||
| 1126 | 1157 | splot_command() | |
| 1127 | 1158 | { | |
| 1128 | 1159 | plot_token = c_token++; | |
| 1160 | + plotted_data_from_stdin = 0; | ||
| 1129 | 1161 | SET_CURSOR_WAIT; | |
| 1130 | 1162 | #ifdef USE_MOUSE | |
| 1131 | 1163 | plot_mode(MODE_SPLOT); | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,5 +1,5 @@ | |||
| 1 | 1 | /* | |
| 2 | - * $Id: command.h,v 1.15.2.1 2000/05/03 21:26:10 joze Exp $ | ||
| 2 | + * $Id: command.h,v 1.15.2.2 2000/06/04 12:53:20 joze Exp $ | ||
| 3 | 3 | */ | |
| 4 | 4 | ||
| 5 | 5 | /* GNUPLOT - command.h */ | |
@@ -133,6 +133,7 @@ int do_line __PROTO((void)); | |||
| 133 | 133 | void toggle_display_of_ipc_commands __PROTO((void)); | |
| 134 | 134 | int display_ipc_commands __PROTO((void)); | |
| 135 | 135 | void do_string __PROTO((char* s)); | |
| 136 | + void do_string_replot __PROTO((char* s)); | ||
| 136 | 137 | #endif | |
| 137 | 138 | #ifdef VMS /* HBB 990829: used only on VMS */ | |
| 138 | 139 | void done __PROTO((int status)); | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,5 +1,5 @@ | |||
| 1 | 1 | #ifndef lint | |
| 2 | - static char *RCSid() { return RCSid("$Id: datafile.c,v 1.16.2.1 2000/05/03 21:26:11 joze Exp $"); } | ||
| 2 | + static char *RCSid() { return RCSid("$Id: datafile.c,v 1.16.2.2 2000/06/04 12:53:20 joze Exp $"); } | ||
| 3 | 3 | #endif | |
| 4 | 4 | ||
| 5 | 5 | /* GNUPLOT - datafile.c */ | |
@@ -631,6 +631,7 @@ int max_using; | |||
| 631 | 631 | #endif /* PIPES */ | |
| 632 | 632 | /* I don't want to call strcmp(). Does it make a difference? */ | |
| 633 | 633 | if (*filename == '-' && strlen(filename) == 1) { | |
| 634 | + plotted_data_from_stdin = 1; | ||
| 634 | 635 | data_fp = lf_top(); | |
| 635 | 636 | if (!data_fp) | |
| 636 | 637 | data_fp = stdin; | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,5 +1,5 @@ | |||
| 1 | 1 | #ifndef lint | |
| 2 | - static char *RCSid() { return RCSid("$Id: mouse.c,v 1.2.2.1 2000/05/03 21:26:11 joze Exp $"); } | ||
| 2 | + static char *RCSid() { return RCSid("$Id: mouse.c,v 1.2.2.2 2000/06/04 12:53:20 joze Exp $"); } | ||
| 3 | 3 | #endif | |
| 4 | 4 | ||
| 5 | 5 | /* GNUPLOT - mouse.c */ | |
@@ -564,9 +564,9 @@ apply_zoom(struct t_zoom *z) | |||
| 564 | 564 | sprintf(s, "set xr[% #g:% #g]; set yr[% #g:% #g]", zoom_now->xmin, zoom_now->xmax, zoom_now->ymin, zoom_now->ymax); | |
| 565 | 565 | do_string(s); | |
| 566 | 566 | ||
| 567 | - sprintf(s, "set x2r[% #g:% #g]; set y2r[% #g:% #g]; replot", | ||
| 567 | + sprintf(s, "set x2r[% #g:% #g]; set y2r[% #g:% #g]", | ||
| 568 | 568 | zoom_now->x2min, zoom_now->x2max, zoom_now->y2min, zoom_now->y2max); | |
| 569 | - do_string(s); | ||
| 569 | + do_string_replot(s); | ||
| 570 | 570 | } | |
| 571 | 571 | ||
| 572 | 572 | ||
@@ -785,7 +785,7 @@ builtin_autoscale(struct gp_event_t *ge) | |||
| 785 | 785 | if (!ge) { | |
| 786 | 786 | return "`builtin-autoscale` (set autoscale; replot)"; | |
| 787 | 787 | } | |
| 788 | - do_string("set autoscale; replot"); | ||
| 788 | + do_string_replot("set autoscale"); | ||
| 789 | 789 | return (char *) 0; | |
| 790 | 790 | } | |
| 791 | 791 | ||
@@ -797,14 +797,14 @@ builtin_toggle_border(struct gp_event_t *ge) | |||
| 797 | 797 | } | |
| 798 | 798 | if (is_3d_plot) { | |
| 799 | 799 | if (draw_border == 4095) | |
| 800 | - do_string("set border; replot"); | ||
| 800 | + do_string_replot("set border"); | ||
| 801 | 801 | else | |
| 802 | - do_string("set border 4095 lw 0.5; replot"); | ||
| 802 | + do_string_replot("set border 4095 lw 0.5"); | ||
| 803 | 803 | } else { | |
| 804 | 804 | if (draw_border == 15) | |
| 805 | - do_string("set border; replot"); | ||
| 805 | + do_string_replot("set border"); | ||
| 806 | 806 | else | |
| 807 | - do_string("set border 15 lw 0.5; replot"); | ||
| 807 | + do_string_replot("set border 15 lw 0.5"); | ||
| 808 | 808 | } | |
| 809 | 809 | return (char *) 0; | |
| 810 | 810 | } | |
@@ -815,7 +815,7 @@ builtin_replot(struct gp_event_t *ge) | |||
| 815 | 815 | if (!ge) { | |
| 816 | 816 | return "`builtin-replot`"; | |
| 817 | 817 | } | |
| 818 | - do_string("replot"); | ||
| 818 | + do_string_replot(""); | ||
| 819 | 819 | return (char *) 0; | |
| 820 | 820 | } | |
| 821 | 821 | ||
@@ -826,9 +826,9 @@ builtin_toggle_grid(struct gp_event_t *ge) | |||
| 826 | 826 | return "`builtin-toggle-grid`"; | |
| 827 | 827 | } | |
| 828 | 828 | if (work_grid.l_type == GRID_OFF) | |
| 829 | - do_string("set grid; replot"); | ||
| 829 | + do_string_replot("set grid"); | ||
| 830 | 830 | else | |
| 831 | - do_string("unset grid; replot"); | ||
| 831 | + do_string_replot("unset grid"); | ||
| 832 | 832 | return (char *) 0; | |
| 833 | 833 | } | |
| 834 | 834 | ||
@@ -852,14 +852,14 @@ builtin_toggle_log(struct gp_event_t *ge) | |||
| 852 | 852 | } | |
| 853 | 853 | if (is_3d_plot) { | |
| 854 | 854 | if (is_log_z) | |
| 855 | - do_string("unset log z; replot"); | ||
| 855 | + do_string_replot("unset log z"); | ||
| 856 | 856 | else | |
| 857 | - do_string("set log z; replot"); | ||
| 857 | + do_string_replot("set log z"); | ||
| 858 | 858 | } else { | |
| 859 | 859 | if (is_log_y) | |
| 860 | - do_string("unset log y; replot"); | ||
| 860 | + do_string_replot("unset log y"); | ||
| 861 | 861 | else | |
| 862 | - do_string("set log y; replot"); | ||
| 862 | + do_string_replot("set log y"); | ||
| 863 | 863 | } | |
| 864 | 864 | return (char *) 0; | |
| 865 | 865 | } | |
@@ -873,9 +873,9 @@ builtin_nearest_log(struct gp_event_t *ge) | |||
| 873 | 873 | if (is_3d_plot) { | |
| 874 | 874 | /* 3D-plot: toggle lin/log z axis */ | |
| 875 | 875 | if (is_log_z) | |
| 876 | - do_string("unset log z; replot"); | ||
| 876 | + do_string_replot("unset log z"); | ||
| 877 | 877 | else | |
| 878 | - do_string("set log z; replot"); | ||
| 878 | + do_string_replot("set log z"); | ||
| 879 | 879 | } else { | |
| 880 | 880 | /* 2D-plot: figure out which axis/axes is/are | |
| 881 | 881 | * close to the mouse cursor, and toggle those lin/log */ | |
@@ -900,7 +900,7 @@ builtin_nearest_log(struct gp_event_t *ge) | |||
| 900 | 900 | change = TRUE; | |
| 901 | 901 | } | |
| 902 | 902 | if (change) | |
| 903 | - do_string("replot"); | ||
| 903 | + do_string_replot(""); | ||
| 904 | 904 | } | |
| 905 | 905 | return (char *) 0; | |
| 906 | 906 | } | |
@@ -1046,11 +1046,11 @@ builtin_toggle_ratio(struct gp_event_t *ge) | |||
| 1046 | 1046 | return "`builtin-toggle-ratio`"; | |
| 1047 | 1047 | } | |
| 1048 | 1048 | if (aspect_ratio == 0) | |
| 1049 | - do_string("set size ratio -1; replot"); | ||
| 1049 | + do_string_replot("set size ratio -1"); | ||
| 1050 | 1050 | else if (aspect_ratio == 1) | |
| 1051 | - do_string("set size nosquare; replot"); | ||
| 1051 | + do_string_replot("set size nosquare"); | ||
| 1052 | 1052 | else | |
| 1053 | - do_string("set size square; replot"); | ||
| 1053 | + do_string_replot("set size square"); | ||
| 1054 | 1054 | return (char *) 0; | |
| 1055 | 1055 | } | |
| 1056 | 1056 | ||
@@ -1602,6 +1602,9 @@ do_event(struct gp_event_t *ge) | |||
| 1602 | 1602 | return; | |
| 1603 | 1603 | } | |
| 1604 | 1604 | ||
| 1605 | + /* disable `replot` when some data were sent through stdin */ | ||
| 1606 | + replot_disabled = plotted_data_from_stdin; | ||
| 1607 | + | ||
| 1605 | 1608 | if (ge->type) { | |
| 1606 | 1609 | FPRINTF((stderr, "(do_event) type = %d\n", ge->type)); | |
| 1607 | 1610 | FPRINTF((stderr, " mx, my = %d, %d\n", ge->mx, ge->my)); | |
@@ -1650,6 +1653,8 @@ do_event(struct gp_event_t *ge) | |||
| 1650 | 1653 | fprintf(stderr, "%s:%d protocol error\n", __FILE__, __LINE__); | |
| 1651 | 1654 | break; | |
| 1652 | 1655 | } | |
| 1656 | + | ||
| 1657 | + replot_disabled = 0; /* enable replot again */ | ||
| 1653 | 1658 | } | |
| 1654 | 1659 | ||
| 1655 | 1660 | static void | |
@@ -2038,21 +2043,21 @@ remove_label(int x, int y) | |||
| 2038 | 2043 | is_3d_plot ? map3d_position : map_position); | |
| 2039 | 2044 | if (-1 != tag) { | |
| 2040 | 2045 | char cmd[0x40]; | |
| 2041 | - sprintf(cmd, "unset label %d; replot", tag); | ||
| 2042 | - do_string(cmd); | ||
| 2046 | + sprintf(cmd, "unset label %d", tag); | ||
| 2047 | + do_string_replot(cmd); | ||
| 2043 | 2048 | } | |
| 2044 | 2049 | } | |
| 2045 | 2050 | ||
| 2046 | 2051 | static void | |
| 2047 | 2052 | put_label(char *label, double x, double y) | |
| 2048 | 2053 | { | |
| 2049 | 2054 | char cmd[0xff]; | |
| 2050 | - sprintf(cmd, "set label \"%s\" at %f,%f %s; replot\n", label, x, y, mouse_setting.labelopts); | ||
| 2051 | - do_string(cmd); | ||
| 2055 | + sprintf(cmd, "set label \"%s\" at %f,%f %s", label, x, y, mouse_setting.labelopts); | ||
| 2056 | + do_string_replot(cmd); | ||
| 2052 | 2057 | } | |
| 2053 | 2058 | ||
| 2054 | 2059 | # ifdef OS2 | |
| 2055 | - /* routine required by pm.trm: fill & send information neede for (un)checking | ||
| 2060 | + /* routine required by pm.trm: fill & send information needed for (un)checking | ||
| 2056 | 2061 | menu items in the Presentation Manager terminal | |
| 2057 | 2062 | */ | |
| 2058 | 2063 | void | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,5 +1,5 @@ | |||
| 1 | 1 | #ifndef lint | |
| 2 | - static char *RCSid() { return RCSid("$Id: plot.c,v 1.31.2.2 2000/05/16 11:26:41 joze Exp $"); } | ||
| 2 | + static char *RCSid() { return RCSid("$Id: plot.c,v 1.31.2.3 2000/06/04 12:53:20 joze Exp $"); } | ||
| 3 | 3 | #endif | |
| 4 | 4 | ||
| 5 | 5 | /* GNUPLOT - plot.c */ | |
@@ -145,6 +145,11 @@ const char *user_shell = NULL; | |||
| 145 | 145 | const char *user_gnuplotpath = NULL; | |
| 146 | 146 | #endif | |
| 147 | 147 | ||
| 148 | + /* flags to disable `replot` when some data are sent through stdin; used by | ||
| 149 | + mouse/hotkey capable terminals */ | ||
| 150 | + int plotted_data_from_stdin = 0; | ||
| 151 | + int replot_disabled = 0; | ||
| 152 | + | ||
| 148 | 153 | #ifdef X11 | |
| 149 | 154 | extern int X11_args __PROTO((int, char **)); | |
| 150 | 155 | #endif | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,5 +1,5 @@ | |||
| 1 | 1 | /* | |
| 2 | - * $Id: plot.h,v 1.29.2.2 2000/05/03 21:26:11 joze Exp $ | ||
| 2 | + * $Id: plot.h,v 1.29.2.3 2000/06/04 12:53:20 joze Exp $ | ||
| 3 | 3 | */ | |
| 4 | 4 | ||
| 5 | 5 | /* GNUPLOT - plot.h */ | |
@@ -780,6 +780,11 @@ extern const char *user_shell; | |||
| 780 | 780 | extern const char *user_gnuplotpath; | |
| 781 | 781 | #endif | |
| 782 | 782 | ||
| 783 | + /* flags to disable `replot` when some data are sent through stdin; used by | ||
| 784 | + mouse/hotkey capable terminals */ | ||
| 785 | + extern int plotted_data_from_stdin; | ||
| 786 | + extern int replot_disabled; | ||
| 787 | + | ||
| 783 | 788 | #ifdef GNUPLOT_HISTORY | |
| 784 | 789 | extern long int gnuplot_history_size; | |
| 785 | 790 | #endif | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,5 +1,5 @@ | |||
| 1 | 1 | #ifndef lint | |
| 2 | - static char *RCSid() { return RCSid("$Id: set.c,v 1.32.2.2 2000/05/03 21:26:12 joze Exp $"); } | ||
| 2 | + static char *RCSid() { return RCSid("$Id: set.c,v 1.32.2.3 2000/06/04 12:53:20 joze Exp $"); } | ||
| 3 | 3 | #endif | |
| 4 | 4 | ||
| 5 | 5 | /* GNUPLOT - set.c */ | |
@@ -510,9 +510,9 @@ reset_command() | |||
| 510 | 510 | data_style = POINTSTYLE; | |
| 511 | 511 | func_style = LINES; | |
| 512 | 512 | bar_size = 1.0; | |
| 513 | - set_lp_properties(&work_grid, 0, GRID_OFF, 0, 0.5, 1.0); | ||
| 514 | - set_lp_properties(&grid_lp, 0, -1, 0, 0.5, 1.0); | ||
| 515 | - set_lp_properties(&mgrid_lp, 0, -1, 0, 0.5, 1.0); | ||
| 513 | + set_lp_properties(&work_grid, 0, GRID_OFF, 0, 1.0, 1.0); | ||
| 514 | + set_lp_properties(&grid_lp, 0, -1, 0, 1.0, 1.0); | ||
| 515 | + set_lp_properties(&mgrid_lp, 0, -1, 0, 1.0, 1.0); | ||
| 516 | 516 | polar_grid_angle = 0; | |
| 517 | 517 | key = -1; | |
| 518 | 518 | is_log_x = FALSE; | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,5 +1,5 @@ | |||
| 1 | 1 | #ifndef lint | |
| 2 | - static char *RCSid() { return RCSid("$Id: version.c,v 1.33.2.2 2000/05/16 11:26:41 joze Exp $"); } | ||
| 2 | + static char *RCSid() { return RCSid("$Id: version.c,v 1.33.2.3 2000/06/04 12:53:20 joze Exp $"); } | ||
| 3 | 3 | #endif | |
| 4 | 4 | ||
| 5 | 5 | /* GNUPLOT - version.c */ | |
@@ -37,8 +37,8 @@ static char *RCSid() { return RCSid("$Id: version.c,v 1.33.2.2 2000/05/16 11:26: | |||
| 37 | 37 | #include "syscfg.h" | |
| 38 | 38 | ||
| 39 | 39 | const char gnuplot_version[] = "3.8c"; | |
| 40 | - const char gnuplot_patchlevel[] = "pm3d 2"; | ||
| 41 | - const char gnuplot_date[] = "Tue, 16 May 2000 12:45:09 +0200"; | ||
| 40 | + const char gnuplot_patchlevel[] = "pm3d 3"; | ||
| 41 | + const char gnuplot_date[] = "Sun, 04 Jun 2000 14:30:05 +0200"; | ||
| 42 | 42 | const char gnuplot_copyright[] = "Copyright(C) 1986 - 1993, 1999, 2000"; | |
| 43 | 43 | ||
| 44 | 44 | const char faq_location[] = FAQ_LOCATION; | |
| Back | FazBrowse Home | New Git URL |
0 commit comments