FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

gnuplot/gnuplot-old@98702c9 · GitHub

Repository navigation

Commit 98702c9

Browse files
joze
committed
- merged pre-pm3d-02a - pre-pm3d-03 from the main trunk - included the `supported terminals' into gnuplot.doc
1 parent e0face0 commit 98702c9

10 files changed

Lines changed: 109 additions & 40 deletions

File tree

‎ChangeLog‎

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff 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+
113
2000-05-25 Petr Mikulik <mikulik@physics.muni.cz>
214
* pm3d: support for pm3d functionality in 'pslatex / pstex' terminals
315

‎docs/gnuplot.doc‎

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff 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 $
22
C 3 December 1998
33
C Copyright (C) 1986 - 1993, 1998 Thomas Williams, Colin Kelley
44
C
@@ -5235,7 +5235,15 @@ C ... and restart the table:
52355235
The main power of the pm3d algorithm (see also my program pm3d) is that
52365236
it can draw maps or surfaces from large data sets without preprocessing even
52375237
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
52395247

52405248
The pm3d algorithm fills the region between two neighbouring points in one
52415249
scan with another two points in the next scan by a gray (or colour) according

‎src/command.c‎

Lines changed: 33 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#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 $"); }
33
#endif
44

55
/* GNUPLOT - command.c */
@@ -414,6 +414,24 @@ char *s;
414414
input_line=orig_input_line;
415415
}
416416

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+
417435
void
418436
restore_prompt(void)
419437
{
@@ -958,6 +976,7 @@ void
958976
plot_command()
959977
{
960978
plot_token = c_token++;
979+
plotted_data_from_stdin = 0;
961980
SET_CURSOR_WAIT;
962981
#ifdef USE_MOUSE
963982
plot_mode(MODE_PLOT);
@@ -1022,6 +1041,18 @@ replot_command()
10221041
{
10231042
if (!*replot_line)
10241043
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+
}
10251056
c_token++;
10261057
SET_CURSOR_WAIT;
10271058
replotrequest();
@@ -1126,6 +1157,7 @@ void
11261157
splot_command()
11271158
{
11281159
plot_token = c_token++;
1160+
plotted_data_from_stdin = 0;
11291161
SET_CURSOR_WAIT;
11301162
#ifdef USE_MOUSE
11311163
plot_mode(MODE_SPLOT);

‎src/command.h‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
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 $
33
*/
44

55
/* GNUPLOT - command.h */
@@ -133,6 +133,7 @@ int do_line __PROTO((void));
133133
void toggle_display_of_ipc_commands __PROTO((void));
134134
int display_ipc_commands __PROTO((void));
135135
void do_string __PROTO((char* s));
136+
void do_string_replot __PROTO((char* s));
136137
#endif
137138
#ifdef VMS /* HBB 990829: used only on VMS */
138139
void done __PROTO((int status));

‎src/datafile.c‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#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 $"); }
33
#endif
44

55
/* GNUPLOT - datafile.c */
@@ -631,6 +631,7 @@ int max_using;
631631
#endif /* PIPES */
632632
/* I don't want to call strcmp(). Does it make a difference? */
633633
if (*filename == '-' && strlen(filename) == 1) {
634+
plotted_data_from_stdin = 1;
634635
data_fp = lf_top();
635636
if (!data_fp)
636637
data_fp = stdin;

‎src/mouse.c‎

Lines changed: 31 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#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 $"); }
33
#endif
44

55
/* GNUPLOT - mouse.c */
@@ -564,9 +564,9 @@ apply_zoom(struct t_zoom *z)
564564
sprintf(s, "set xr[% #g:% #g]; set yr[% #g:% #g]", zoom_now->xmin, zoom_now->xmax, zoom_now->ymin, zoom_now->ymax);
565565
do_string(s);
566566

567-
sprintf(s, "set x2r[% #g:% #g]; set y2r[% #g:% #g]; replot",
567+
sprintf(s, "set x2r[% #g:% #g]; set y2r[% #g:% #g]",
568568
zoom_now->x2min, zoom_now->x2max, zoom_now->y2min, zoom_now->y2max);
569-
do_string(s);
569+
do_string_replot(s);
570570
}
571571

572572

@@ -785,7 +785,7 @@ builtin_autoscale(struct gp_event_t *ge)
785785
if (!ge) {
786786
return "`builtin-autoscale` (set autoscale; replot)";
787787
}
788-
do_string("set autoscale; replot");
788+
do_string_replot("set autoscale");
789789
return (char *) 0;
790790
}
791791

@@ -797,14 +797,14 @@ builtin_toggle_border(struct gp_event_t *ge)
797797
}
798798
if (is_3d_plot) {
799799
if (draw_border == 4095)
800-
do_string("set border; replot");
800+
do_string_replot("set border");
801801
else
802-
do_string("set border 4095 lw 0.5; replot");
802+
do_string_replot("set border 4095 lw 0.5");
803803
} else {
804804
if (draw_border == 15)
805-
do_string("set border; replot");
805+
do_string_replot("set border");
806806
else
807-
do_string("set border 15 lw 0.5; replot");
807+
do_string_replot("set border 15 lw 0.5");
808808
}
809809
return (char *) 0;
810810
}
@@ -815,7 +815,7 @@ builtin_replot(struct gp_event_t *ge)
815815
if (!ge) {
816816
return "`builtin-replot`";
817817
}
818-
do_string("replot");
818+
do_string_replot("");
819819
return (char *) 0;
820820
}
821821

@@ -826,9 +826,9 @@ builtin_toggle_grid(struct gp_event_t *ge)
826826
return "`builtin-toggle-grid`";
827827
}
828828
if (work_grid.l_type == GRID_OFF)
829-
do_string("set grid; replot");
829+
do_string_replot("set grid");
830830
else
831-
do_string("unset grid; replot");
831+
do_string_replot("unset grid");
832832
return (char *) 0;
833833
}
834834

@@ -852,14 +852,14 @@ builtin_toggle_log(struct gp_event_t *ge)
852852
}
853853
if (is_3d_plot) {
854854
if (is_log_z)
855-
do_string("unset log z; replot");
855+
do_string_replot("unset log z");
856856
else
857-
do_string("set log z; replot");
857+
do_string_replot("set log z");
858858
} else {
859859
if (is_log_y)
860-
do_string("unset log y; replot");
860+
do_string_replot("unset log y");
861861
else
862-
do_string("set log y; replot");
862+
do_string_replot("set log y");
863863
}
864864
return (char *) 0;
865865
}
@@ -873,9 +873,9 @@ builtin_nearest_log(struct gp_event_t *ge)
873873
if (is_3d_plot) {
874874
/* 3D-plot: toggle lin/log z axis */
875875
if (is_log_z)
876-
do_string("unset log z; replot");
876+
do_string_replot("unset log z");
877877
else
878-
do_string("set log z; replot");
878+
do_string_replot("set log z");
879879
} else {
880880
/* 2D-plot: figure out which axis/axes is/are
881881
* close to the mouse cursor, and toggle those lin/log */
@@ -900,7 +900,7 @@ builtin_nearest_log(struct gp_event_t *ge)
900900
change = TRUE;
901901
}
902902
if (change)
903-
do_string("replot");
903+
do_string_replot("");
904904
}
905905
return (char *) 0;
906906
}
@@ -1046,11 +1046,11 @@ builtin_toggle_ratio(struct gp_event_t *ge)
10461046
return "`builtin-toggle-ratio`";
10471047
}
10481048
if (aspect_ratio == 0)
1049-
do_string("set size ratio -1; replot");
1049+
do_string_replot("set size ratio -1");
10501050
else if (aspect_ratio == 1)
1051-
do_string("set size nosquare; replot");
1051+
do_string_replot("set size nosquare");
10521052
else
1053-
do_string("set size square; replot");
1053+
do_string_replot("set size square");
10541054
return (char *) 0;
10551055
}
10561056

@@ -1602,6 +1602,9 @@ do_event(struct gp_event_t *ge)
16021602
return;
16031603
}
16041604

1605+
/* disable `replot` when some data were sent through stdin */
1606+
replot_disabled = plotted_data_from_stdin;
1607+
16051608
if (ge->type) {
16061609
FPRINTF((stderr, "(do_event) type = %d\n", ge->type));
16071610
FPRINTF((stderr, " mx, my = %d, %d\n", ge->mx, ge->my));
@@ -1650,6 +1653,8 @@ do_event(struct gp_event_t *ge)
16501653
fprintf(stderr, "%s:%d protocol error\n", __FILE__, __LINE__);
16511654
break;
16521655
}
1656+
1657+
replot_disabled = 0; /* enable replot again */
16531658
}
16541659

16551660
static void
@@ -2038,21 +2043,21 @@ remove_label(int x, int y)
20382043
is_3d_plot ? map3d_position : map_position);
20392044
if (-1 != tag) {
20402045
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);
20432048
}
20442049
}
20452050

20462051
static void
20472052
put_label(char *label, double x, double y)
20482053
{
20492054
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);
20522057
}
20532058

20542059
# 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
20562061
menu items in the Presentation Manager terminal
20572062
*/
20582063
void

‎src/plot.c‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#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 $"); }
33
#endif
44

55
/* GNUPLOT - plot.c */
@@ -145,6 +145,11 @@ const char *user_shell = NULL;
145145
const char *user_gnuplotpath = NULL;
146146
#endif
147147

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+
148153
#ifdef X11
149154
extern int X11_args __PROTO((int, char **));
150155
#endif

‎src/plot.h‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
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 $
33
*/
44

55
/* GNUPLOT - plot.h */
@@ -780,6 +780,11 @@ extern const char *user_shell;
780780
extern const char *user_gnuplotpath;
781781
#endif
782782

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+
783788
#ifdef GNUPLOT_HISTORY
784789
extern long int gnuplot_history_size;
785790
#endif

‎src/set.c‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#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 $"); }
33
#endif
44

55
/* GNUPLOT - set.c */
@@ -510,9 +510,9 @@ reset_command()
510510
data_style = POINTSTYLE;
511511
func_style = LINES;
512512
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);
516516
polar_grid_angle = 0;
517517
key = -1;
518518
is_log_x = FALSE;

‎src/version.c‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#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 $"); }
33
#endif
44

55
/* 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:
3737
#include "syscfg.h"
3838

3939
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";
4242
const char gnuplot_copyright[] = "Copyright(C) 1986 - 1993, 1999, 2000";
4343

4444
const char faq_location[] = FAQ_LOCATION;

0 commit comments

Comments
 (0)

Back | FazBrowse Home | New Git URL