You can subscribe to this list here.
2003 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(2) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2004 |
Jan
(1) |
Feb
(2) |
Mar
(2) |
Apr
(22) |
May
(14) |
Jun
(18) |
Jul
(19) |
Aug
(7) |
Sep
(4) |
Oct
(6) |
Nov
(12) |
Dec
(14) |
2005 |
Jan
(15) |
Feb
(11) |
Mar
(11) |
Apr
(9) |
May
(119) |
Jun
(25) |
Jul
(16) |
Aug
(19) |
Sep
(26) |
Oct
(14) |
Nov
(7) |
Dec
(45) |
2006 |
Jan
(22) |
Feb
(7) |
Mar
(11) |
Apr
(11) |
May
(12) |
Jun
(19) |
Jul
(12) |
Aug
(5) |
Sep
(21) |
Oct
(33) |
Nov
(42) |
Dec
(34) |
2007 |
Jan
(26) |
Feb
(27) |
Mar
(54) |
Apr
(37) |
May
(68) |
Jun
(81) |
Jul
(55) |
Aug
(86) |
Sep
(60) |
Oct
(33) |
Nov
(33) |
Dec
(47) |
2008 |
Jan
(37) |
Feb
(37) |
Mar
(52) |
Apr
(63) |
May
(98) |
Jun
(70) |
Jul
(61) |
Aug
(38) |
Sep
(64) |
Oct
(55) |
Nov
(48) |
Dec
(111) |
2009 |
Jan
(68) |
Feb
(83) |
Mar
(102) |
Apr
(140) |
May
(156) |
Jun
(65) |
Jul
(75) |
Aug
(26) |
Sep
(28) |
Oct
(31) |
Nov
(38) |
Dec
(78) |
2010 |
Jan
(53) |
Feb
(33) |
Mar
(87) |
Apr
(94) |
May
(77) |
Jun
(84) |
Jul
(66) |
Aug
(74) |
Sep
(53) |
Oct
(40) |
Nov
(38) |
Dec
(31) |
2011 |
Jan
(19) |
Feb
(17) |
Mar
(43) |
Apr
(53) |
May
(42) |
Jun
(35) |
Jul
(19) |
Aug
|
Sep
|
Oct
|
Nov
(7) |
Dec
|
2012 |
Jan
(1) |
Feb
(1) |
Mar
(1) |
Apr
(2) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2013 |
Jan
|
Feb
|
Mar
|
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
(1) |
Sep
(1) |
Oct
(1) |
Nov
(1) |
Dec
|
2014 |
Jan
|
Feb
|
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(3) |
Nov
|
Dec
|
2016 |
Jan
|
Feb
|
Mar
|
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(4) |
2017 |
Jan
(1) |
Feb
(3) |
Mar
|
Apr
|
May
(2) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(1) |
Nov
|
Dec
|
2018 |
Jan
|
Feb
|
Mar
|
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
|
Sep
(1) |
Oct
(2) |
Nov
|
Dec
(1) |
2020 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2021 |
Jan
|
Feb
|
Mar
|
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
|
Sep
(2) |
Oct
|
Nov
|
Dec
|
2022 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(3) |
Jun
|
Jul
|
Aug
|
Sep
(4) |
Oct
|
Nov
|
Dec
|
2024 |
Jan
(1) |
Feb
|
Mar
(2) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2025 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(5) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Neal H. W. <ne...@gn...> - 2004-11-20 23:33:19
|
I need the ability to automatically save the history to a file on exit from gnuplot and restore it when it is run using gnuplot's version of readline. As I am using Debian, I started my hack using that. Since it was rather simple, I have cleaned it up so that others can use it. The supplied patch is against the Debian supplied version of gnuplot (version 4.0 patch level 0). This does not cleanly apply to CVS head, however, if there is interest, I can clean it up. I have tested the patch on Debian GNU/Linux as well as on Solaris (uname -a => SunOS escher 5.8 Generic_108528-29 sun4u sparc SUNW,Ultra-60). The code should be portable to other POSIX-like environments; I don't know much about the issues porting to other systems. The patch includes three new files (src/getline.c, src/read_history.c and src/tilde_expand.c) which emulate the funtionality provided by GNU libreadline. I have licensed these under a similar license as gnuplot but (hopefully) removed the clauses which make them GPL incompatible while remaining compatible with gnuplot. If this is a problem, I am willing to discuss this. Do you need a copyright assignments? Thanks, Neal 2004-11-20 Neal H. Walfield <ne...@gn...> Add the ability to save and restore the history with gnuplot's readline implementation. * configure.in (history-file): Update comment to reflex that GNU Readline is no longer required. (GNUPLOT_HISTORY): No longer depend on the availability of <readline/tilde.h>. Check for getline, tilde_expand and read_history replacing them if they are missing. * src/Makefile.am (gnuplot_SOURCES): Add getline.c, tilde_expand.c and read_history.c. * src/getline.c: New file. * src/tilde_expand.c: New file. * src/read_history.c: New file. * src/gp_hist.h (write_history_n): Return an int, not a void. (write_history): Likewise. (read_history): Add prototype. * src/history.c: Include <string.h>. (write_history_n): Change return type from void to int. Return 0 on success to be consistent with libreadline's interface. (write_history): Likewise. * src/plot.c (expanded_history_filename) [GNUPLOT_HISTORY]: Declare even if HAVE_LIBREADLINE is not defined. (wrapper_for_write_history): Likewise. (rl_complete_with_tilde_expansion): Likewise. [GNUPLOT_HISTORY_FILE]: Likewise. (gnuplot_history_size): Likewise. (tilde_expand) [GNUPLOT_HISTORY && !HAVE_LIBREADLINE]: Declare. (main) [GNUPLOT_HISTORY]: Read and write history file (even if HAVE_LIBREADLINE is not defined). (wrapper_for_write_history) [GNUPLOT_HISTORY && !HAVE_LIBREADLINE]: Implement this case. * src/set.c (set_history_size) [GNUPLOT_HISTORY]: Declare even if HAVE_LIBREADLINE is not defined. (set_command) [GNUPLOT_HISTORY]: Recognize S_HISTORYSIZE even if HAVE_LIBREADLINE is not defined. (set_historysize) [GNUPLOT_HISTORY]: Define even if HAVE_LIBREADLINE is not defined. * src/set.c (show_history_size) [GNUPLOT_HISTORY]: Declare even if HAVE_LIBREADLINE is not defined. (show_command) [GNUPLOT_HISTORY]: Recognize S_HISTORYSIZE even if HAVE_LIBREADLINE is not defined. (show_historysize) [GNUPLOT_HISTORY]: Define even if HAVE_LIBREADLINE is not defined. * src/tables.c (set_tbl): Add S_HISTORYSIZE even if HAVE_LIBREADLINE is not defined. * src/unset.c (unset_history_size) [GNUPLOT_HISTORY]: Declare even if HAVE_LIBREADLINE is not defined. (unset_command) [GNUPLOT_HISTORY]: Recognize S_HISTORYSIZE even if HAVE_LIBREADLINE is not defined. (unset_historysize) [GNUPLOT_HISTORY]: Define even if HAVE_LIBREADLINE is not defined. * docs/gnuplot.texi (Command-line-editing): Add that the history will be saved. (historysize): This is now used if history support is enabled. diff -upr gnuplot-4.0.0-orig/configure.in gnuplot-4.0.0/configure.in --- gnuplot-4.0.0-orig/configure.in 2004-04-10 16:55:14.000000000 +0100 +++ gnuplot-4.0.0/configure.in 2004-11-20 22:00:53.000000000 +0000 @@ -261,9 +261,9 @@ AC_ARG_WITH(readline,dnl --with-readline=DIR Specify the location of GNU readline],, test -z "$with_readline" && with_readline=yes) -dnl Gnuplot history, needs GNU readline +dnl Gnuplot history AC_ARG_ENABLE(history-file,dnl -[ --enable-history-file use history file (requires GNU readline)],, +[ --enable-history-file use history file],, test -z "$enable_history_file" && enable_history_file=no) dnl GNU readline and the required terminal library @@ -310,14 +310,7 @@ please add path to readline.h to CPPFLAG AC_MSG_WARN([found GNU readline library but not history.h please add path to history.h to CPPFLAGS in Makefile])) - if test "$enable_history_file" = yes; then - AC_CHECK_HEADERS(readline/tilde.h, - AC_DEFINE(GNUPLOT_HISTORY,1, - [ Define if you want to use a gnuplot history file with GNU readline. ])) - fi - fi # ! ac_cv_lib_readline_readline = no - fi # ! with_readline != yes if test "$with_readline" = yes; then @@ -325,6 +318,17 @@ please add path to history.h to CPPFLAGS [ Define if you want to use the included readline function. ]) fi + if test "$enable_history_file" = yes; then + AC_DEFINE(GNUPLOT_HISTORY,1, + [ Define if you want to use a gnuplot history file (requires readline facilities). ]) + + AC_CHECK_HEADERS([readline/tilde.h]) + + # Check for GNU getline and libreadline's tilde_expand and read_history + # otherwise use our own replacements. + AC_REPLACE_FUNCS([getline tilde_expand read_history]) + fi + fi dnl end readline diff -upr gnuplot-4.0.0-orig/docs/gnuplot.texi gnuplot-4.0.0/docs/gnuplot.texi --- gnuplot-4.0.0-orig/docs/gnuplot.texi 2004-11-20 22:11:06.000000000 +0000 +++ gnuplot-4.0.0/docs/gnuplot.texi 2004-11-20 22:09:05.000000000 +0000 @@ -697,6 +697,10 @@ The Atari version of readline defines so @end example +When readline support is enabled, the history will be saved to the +file ~/.gnuplot_history and reloaded on start-up. This location may +be overridden by setting the GNUPLOT_HISTORY_FILE environment +variable. @node Comments, Coordinates, Command-line-editing, gnuplot @section Comments @@ -6627,7 +6631,7 @@ and @cindex nohistorysize Note: the command @ref{historysize} is only available when -compiled with the gnu readline. +compiled with readline support. Syntax: @example diff -upr gnuplot-4.0.0-orig/src/Makefile.am gnuplot-4.0.0/src/Makefile.am --- gnuplot-4.0.0-orig/src/Makefile.am 2004-02-19 22:43:14.000000000 +0000 +++ gnuplot-4.0.0/src/Makefile.am 2004-11-20 20:56:21.000000000 +0000 @@ -24,19 +24,20 @@ noinst_PROGRAMS = bf_test XLIBS = @LIBRARIES_FOR_X@ AM_CPPFLAGS = -I../term -I$(top_srcdir)/term -DBINDIR=\"$(bindir)\" -DX11_DRIVER_DIR=\"$(X11_DRIVER_DIR)\" -DCONTACT=\"$(EMAIL)\" -DHELPFILE=\"$(HELPFILE)\" -gnuplot_SOURCES = alloc.c alloc.h ansichek.h axis.c axis.h binary.c \ -binary.h bitmap.c bitmap.h color.c color.h command.c command.h \ -contour.c contour.h datafile.c datafile.h dynarray.c dynarray.h eval.c \ -eval.h fit.c fit.h gadgets.c gadgets.h getcolor.c getcolor.h \ -gp_hist.h gp_time.h gp_types.h graph3d.c graph3d.h graphics.c graphics.h \ -help.c help.h hidden3d.c hidden3d.h history.c internal.c internal.h \ -interpol.c interpol.h matrix.c matrix.h misc.c misc.h mouse.c mouse.h \ -mousecmn.h national.h parse.c parse.h plot.c plot.h plot2d.c plot2d.h \ -plot3d.c plot3d.h pm3d.c pm3d.h readline.c readline.h save.c \ -save.h scanner.c scanner.h set.c setshow.h show.c specfun.c specfun.h \ -standard.c standard.h stdfn.c stdfn.h syscfg.h tables.c tables.h \ -template.h term_api.h term.c term.h time.c unset.c util.c util.h \ -util3d.c util3d.h variable.c variable.h version.c version.h +gnuplot_SOURCES = alloc.c alloc.h ansichek.h axis.c axis.h binary.c \ +binary.h bitmap.c bitmap.h color.c color.h command.c command.h \ +contour.c contour.h datafile.c datafile.h dynarray.c dynarray.h eval.c \ +eval.h fit.c fit.h gadgets.c gadgets.h getcolor.c getcolor.h getline.c \ +gp_hist.h gp_time.h gp_types.h graph3d.c graph3d.h graphics.c \ +graphics.h help.c help.h hidden3d.c hidden3d.h history.c internal.c \ +internal.h interpol.c interpol.h matrix.c matrix.h misc.c misc.h \ +mouse.c mouse.h mousecmn.h national.h parse.c parse.h plot.c plot.h \ +plot2d.c plot2d.h plot3d.c plot3d.h pm3d.c pm3d.h read_history.c \ +readline.c readline.h save.c save.h scanner.c scanner.h set.c \ +setshow.h show.c specfun.c specfun.h standard.c standard.h stdfn.c \ +stdfn.h syscfg.h tables.c tables.h template.h term_api.h term.c term.h \ +tilde_expand.c time.c unset.c util.c util.h util3d.c util3d.h \ +variable.c variable.h version.c version.h gnuplot_LDADD = $(TERMLIBS) $(TERMXLIBS) diff -upr gnuplot-4.0.0-orig/src/gp_hist.h gnuplot-4.0.0/src/gp_hist.h --- gnuplot-4.0.0-orig/src/gp_hist.h 2004-04-13 18:23:53.000000000 +0100 +++ gnuplot-4.0.0/src/gp_hist.h 2004-11-20 12:15:24.000000000 +0000 @@ -64,10 +64,11 @@ extern struct hist *cur_entry; #if defined(READLINE) && !defined(HAVE_LIBREADLINE) void add_history __PROTO((char *line)); -void write_history_n __PROTO((const int, const char *, const char *)); -void write_history __PROTO((char *)); +int write_history_n __PROTO((const int, const char *, const char *)); +int write_history __PROTO((char *)); char *history_find __PROTO((char *)); int history_find_all __PROTO((char *)); +void read_history __PROTO((const char *)); #endif /* READLINE && !HAVE_LIBREADLINE */ #endif /* GNUPLOT_HISTORY_H */ diff -upr gnuplot-4.0.0-orig/src/history.c gnuplot-4.0.0/src/history.c --- gnuplot-4.0.0-orig/src/history.c 2004-04-13 18:23:58.000000000 +0100 +++ gnuplot-4.0.0/src/history.c 2004-11-20 21:04:13.000000000 +0000 @@ -35,6 +35,7 @@ static char *RCSid() { return RCSid("$Id ]*/ #include <stdio.h> +#include <string.h> #include "gp_hist.h" @@ -117,8 +118,10 @@ char *line; * filename == "" ... write to stdout, but without entry numbers * mode ... should be "w" or "a" to select write or append for file, * ignored if history is written to a pipe + * Return value: + * 0 on success. */ -void +int write_history_n(n, filename, mode) const int n; const char *filename; @@ -131,7 +134,7 @@ const char *mode; int hist_index = 1; if (entry == NULL) - return; /* no history yet */ + return 0; /* no history yet */ /* find the beginning of the history and count nb of entries */ while (entry->prev != NULL) { @@ -172,19 +175,23 @@ const char *mode; pclose(out); else #endif - fclose(out); -} + fclose(out); + } + + return 0; } /* obviously the same routine as in GNU readline, according to code from - * plot.c:#if defined(HAVE_LIBREADLINE) && defined(GNUPLOT_HISTORY) + * plot.c:#if defined(GNUPLOT_HISTORY) + * Return value: + * 0 on success. */ -void +int write_history(filename) char *filename; { - write_history_n(0, filename, "w"); + return write_history_n(0, filename, "w"); } diff -upr gnuplot-4.0.0-orig/src/plot.c gnuplot-4.0.0/src/plot.c --- gnuplot-4.0.0-orig/src/plot.c 2004-04-14 16:26:21.000000000 +0100 +++ gnuplot-4.0.0/src/plot.c 2004-11-20 12:48:08.000000000 +0000 @@ -99,24 +99,7 @@ extern smg$create_key_table(); # endif #endif /* _Windows */ -/* GNU readline - * Only required by two files directly, - * so I don't put this into a header file. -lh - */ -#ifdef HAVE_LIBREADLINE -extern int rl_complete_with_tilde_expansion; - -/* enable gnuplot history with readline */ -# ifdef GNUPLOT_HISTORY -# include <readline/tilde.h> -# ifndef GNUPLOT_HISTORY_FILE -# define GNUPLOT_HISTORY_FILE "~/.gnuplot_history" -# endif -# ifndef HISTORY_SIZE -/* Can be overriden with the environment variable 'GNUPLOT_HISTORY_SIZE' */ -# define HISTORY_SIZE 666 -# endif -long int gnuplot_history_size = HISTORY_SIZE; +#if defined(GNUPLOT_HISTORY) /* * The next variable is a pointer to the value returned from 'tilde_expand()'. * This function expands '~' to the user's home directory, or $HOME, with @@ -128,8 +111,29 @@ static char *expanded_history_filename; static void wrapper_for_write_history __PROTO((void)); -# endif /* GNUPLOT_HISTORY */ -#endif /* HAVE_LIBREADLINE */ +extern int rl_complete_with_tilde_expansion; + +/* GNU readline + * Only required by two files directly, + * so I don't put this into a header file. -lh + */ +/* enable gnuplot history with readline */ +# ifdef HAVE_LIBREADLINE +# include <readline/tilde.h> +# else +extern char *tilde_expand(const char *path); +# endif + +# ifndef GNUPLOT_HISTORY_FILE +# define GNUPLOT_HISTORY_FILE "~/.gnuplot_history" +# endif +# ifndef HISTORY_SIZE +/* Can be overriden with the environment variable 'GNUPLOT_HISTORY_SIZE' */ +# define HISTORY_SIZE 666 +# endif +long int gnuplot_history_size = HISTORY_SIZE; + +#endif /* GNUPLOT_HISTORY */ TBOOLEAN interactive = TRUE; /* FALSE if stdin not a terminal */ static TBOOLEAN noinputfiles = TRUE; /* FALSE if there are script files */ @@ -531,10 +535,13 @@ main(argc, argv) init_fit(); /* Initialization of fitting module */ if (interactive && term != 0) { /* not unknown */ -#if defined(HAVE_LIBREADLINE) && defined(GNUPLOT_HISTORY) +#if defined(GNUPLOT_HISTORY) FPRINTF((stderr, "Before read_history\n")); - expanded_history_filename = tilde_expand(GNUPLOT_HISTORY_FILE); - FPRINTF((stderr, "expanded_history_filename = %s\n", expanded_history_filename)); + expanded_history_filename + = tilde_expand(getenv ("GNUPLOT_HISTORY_FILE") + ?: GNUPLOT_HISTORY_FILE); + FPRINTF((stderr, "expanded_history_filename = %s\n", + expanded_history_filename)); read_history(expanded_history_filename); { /* BEGIN: Go local to get environment variable */ @@ -553,7 +560,7 @@ main(argc, argv) * want to use them, 'write_history()' is called directly. */ GP_ATEXIT(wrapper_for_write_history); -#endif /* HAVE_LIBREADLINE && GNUPLOT_HISTORY */ +#endif /* GNUPLOT_HISTORY */ fprintf(stderr, "\nTerminal type set to '%s'\n", term->name); } /* if (interactive && term != 0) */ @@ -632,12 +641,12 @@ main(argc, argv) while (!com_line()); } -#if defined(HAVE_LIBREADLINE) && defined(GNUPLOT_HISTORY) +#if defined(GNUPLOT_HISTORY) #if !defined(HAVE_ATEXIT) && !defined(HAVE_ON_EXIT) /* You should be here if you neither have 'atexit()' nor 'on_exit()' */ wrapper_for_write_history(); #endif /* !HAVE_ATEXIT && !HAVE_ON_EXIT */ -#endif /* HAVE_LIBREADLINE && GNUPLOT_HISTORY */ +#endif /* GNUPLOT_HISTORY */ term_reset(); @@ -923,11 +932,12 @@ RexxInterface(PRXSTRING rxCmd, PUSHORT p } #endif -#if defined(HAVE_LIBREADLINE) && defined(GNUPLOT_HISTORY) +#if defined(GNUPLOT_HISTORY) static void wrapper_for_write_history() { -#if 1 +#if defined(HAVE_LIBREADLINE) +# if 1 /* Alternative code, saves one disk access */ if (history_is_stifled()) unstifle_history(); @@ -939,14 +949,20 @@ wrapper_for_write_history() fprintf (stderr, "Warning: Could not write history file!!!\n"); unstifle_history(); -#else +# else /* if writing was successful, truncate history * to gnuplot_history_size lines */ if (write_history(expanded_history_filename)) { +# if defined(HAVE_LIBREADLINE) if (gnuplot_history_size >= 0) history_truncate_file(expanded_history_filename, gnuplot_history_size); +# endif } +# endif + +#else /* HAVE_LIBREADLINE */ + write_history_n(gnuplot_history_size, expanded_history_filename, "w"); #endif } -#endif /* HAVE_LIBREADLINE && GNUPLOT_HISTORY */ +#endif /* GNUPLOT_HISTORY */ diff -upr gnuplot-4.0.0-orig/src/set.c gnuplot-4.0.0/src/set.c --- gnuplot-4.0.0-orig/src/set.c 2004-04-13 18:24:00.000000000 +0100 +++ gnuplot-4.0.0/src/set.c 2004-11-19 16:46:04.000000000 +0000 @@ -91,7 +91,7 @@ static void set_fit __PROTO((void)); static void set_format __PROTO((void)); static void set_grid __PROTO((void)); static void set_hidden3d __PROTO((void)); -#if defined(HAVE_LIBREADLINE) && defined(GNUPLOT_HISTORY) +#if defined(GNUPLOT_HISTORY) static void set_historysize __PROTO((void)); #endif static void set_isosamples __PROTO((void)); @@ -301,7 +301,7 @@ set_command() case S_HIDDEN3D: set_hidden3d(); break; -#if defined(HAVE_LIBREADLINE) && defined(GNUPLOT_HISTORY) +#if defined(GNUPLOT_HISTORY) case S_HISTORYSIZE: set_historysize(); break; @@ -1404,7 +1404,7 @@ set_hidden3d() } -#if defined(HAVE_LIBREADLINE) && defined(GNUPLOT_HISTORY) +#if defined(GNUPLOT_HISTORY) /* process 'set historysize' command */ static void set_historysize() Only in gnuplot-4.0.0/src: set.o diff -upr gnuplot-4.0.0-orig/src/show.c gnuplot-4.0.0/src/show.c --- gnuplot-4.0.0-orig/src/show.c 2004-04-15 11:02:11.000000000 +0100 +++ gnuplot-4.0.0/src/show.c 2004-11-19 16:46:35.000000000 +0000 @@ -128,7 +128,7 @@ static void show_isosamples __PROTO((voi static void show_view __PROTO((void)); static void show_surface __PROTO((void)); static void show_hidden3d __PROTO((void)); -#if defined(HAVE_LIBREADLINE) && defined(GNUPLOT_HISTORY) +#if defined(GNUPLOT_HISTORY) static void show_historysize __PROTO((void)); #endif static void show_size __PROTO((void)); @@ -384,7 +384,7 @@ show_command() case S_HIDDEN3D: show_hidden3d(); break; -#if defined(HAVE_LIBREADLINE) && defined(GNUPLOT_HISTORY) +#if defined(GNUPLOT_HISTORY) case S_HISTORYSIZE: show_historysize(); break; @@ -790,7 +790,7 @@ show_all() show_view(); show_surface(); show_hidden3d(); -#if defined(HAVE_LIBREADLINE) && defined(GNUPLOT_HISTORY) +#if defined(GNUPLOT_HISTORY) show_historysize(); #endif show_size(); @@ -2381,7 +2381,7 @@ show_hidden3d() } -#if defined(HAVE_LIBREADLINE) && defined(GNUPLOT_HISTORY) +#if defined(GNUPLOT_HISTORY) /* process 'show historysize' command */ static void show_historysize() diff -upr gnuplot-4.0.0-orig/src/tables.c gnuplot-4.0.0/src/tables.c --- gnuplot-4.0.0-orig/src/tables.c 2004-04-13 18:24:01.000000000 +0100 +++ gnuplot-4.0.0/src/tables.c 2004-11-19 16:46:44.000000000 +0000 @@ -178,7 +178,7 @@ const struct gen_table set_tbl[] = { "fu$nctions", S_FUNCTIONS }, { "g$rid", S_GRID }, { "hid$den3d", S_HIDDEN3D }, -#if defined(HAVE_LIBREADLINE) && defined(GNUPLOT_HISTORY) +#if defined(GNUPLOT_HISTORY) { "his$torysize", S_HISTORYSIZE }, #endif { "is$osamples", S_ISOSAMPLES }, diff -upr gnuplot-4.0.0-orig/src/unset.c gnuplot-4.0.0/src/unset.c --- gnuplot-4.0.0-orig/src/unset.c 2004-04-13 18:24:02.000000000 +0100 +++ gnuplot-4.0.0/src/unset.c 2004-11-19 16:47:07.000000000 +0000 @@ -83,7 +83,7 @@ static void unset_fit __PROTO((void)); static void unset_format __PROTO((void)); static void unset_grid __PROTO((void)); static void unset_hidden3d __PROTO((void)); -#if defined(HAVE_LIBREADLINE) && defined(GNUPLOT_HISTORY) +#if defined(GNUPLOT_HISTORY) static void unset_historysize __PROTO((void)); #endif static void unset_isosamples __PROTO((void)); @@ -224,7 +224,7 @@ unset_command() case S_HIDDEN3D: unset_hidden3d(); break; -#if defined(HAVE_LIBREADLINE) && defined(GNUPLOT_HISTORY) +#if defined(GNUPLOT_HISTORY) case S_HISTORYSIZE: unset_historysize(); break; @@ -813,7 +813,7 @@ unset_hidden3d() } -#if defined(HAVE_LIBREADLINE) && defined(GNUPLOT_HISTORY) +#if defined(GNUPLOT_HISTORY) /* process 'unset historysize' command */ static void unset_historysize() --- /dev/null 2004-10-30 17:33:07.000000000 +0100 +++ gnuplot-4.0.0/src/getline.c 2004-11-20 22:00:19.000000000 +0000 @@ -0,0 +1,101 @@ +/*[ + * Copyright 2004 Neal H. Walfield + * + * Permission to use, copy, and distribute this software and its + * documentation for any purpose with or without fee is hereby + * granted, provided that this permission notice appear in supporting + * documentation. + * + * Permission to modify the software is granted. Permission to + * distribute binaries produced by compiling modified sources is granted, + * provided you + * 1. distribute the corresponding source modifications + * 2. retain our contact information in regard to use of the base + * software. + * Permission to distribute the released version of the source code is + * granted with same provision 2 for binary distributions. + * + * This software is provided "as is" without express or implied warranty + * to the extent permitted by applicable law. + ]*/ + +#include "config.h" + +/* Only needed if compiling with readline support. */ +#ifdef READLINE + +# ifndef HAVE_GETLINE + +#include <stdio.h> +#include <stdlib.h> +#include <unistd.h> /* For ssize_t. */ + +#define INITAL_ALLOC 128 + +/* Append character C to the buffer *LINE of size *S filled with *LEN + bytes so far. Increase the buffer if necessary using realloc. + Returns -1 on failure. */ +static int +add_char (char **line, size_t *s, ssize_t *len, int c) +{ + if (*len == *s) { + char *temp; + + if (*s == 0) { + temp = malloc (INITAL_ALLOC); + if (! temp) + return -1; + + *line = temp; + *s = INITAL_ALLOC; + } else { + temp = realloc (*line, *s * 2); + if (! temp) + return -1; + + *line = temp; + *s *= 2; + } + } + + (*line)[(*len) ++] = c; + return 0; +} + +/* Replacement for GNU getline. */ +ssize_t +getline (char **line, size_t *s, FILE *fp) +{ + int err; + ssize_t len = 0; + int c; + + do { + c = fgetc (fp); + if (c == EOF) { + if (len == 0) + /* Got an EOF and have not read any characters. */ + return -1; + else + break; + } + + err = add_char (line, s, &len, c); + if (err == -1) + return err; + } while ((*line)[len - 1] != '\n'); + + /* Add the NUL terminator. */ + err = add_char (line, s, &len, '\0'); + if (err == -1) + return err; + + /* Success. Return the number of bytes read from the file (which, + of course, does not include the NUL terminator which we just + added. */ + return len - 1; +} + +# endif /* HAVE_GET_LINE */ + +#endif /* READLINE */ --- /dev/null 2004-10-30 17:33:07.000000000 +0100 +++ gnuplot-4.0.0/src/read_history.c 2004-11-20 21:02:29.000000000 +0000 @@ -0,0 +1,74 @@ +/*[ + * Copyright 2004 Neal H. Walfield + * + * Permission to use, copy, and distribute this software and its + * documentation for any purpose with or without fee is hereby + * granted, provided that this permission notice appear in supporting + * documentation. + * + * Permission to modify the software is granted. Permission to + * distribute binaries produced by compiling modified sources is granted, + * provided you + * 1. distribute the corresponding source modifications + * 2. retain our contact information in regard to use of the base + * software. + * Permission to distribute the released version of the source code is + * granted with same provision 2 for binary distributions. + * + * This software is provided "as is" without express or implied warranty + * to the extent permitted by applicable law. + ]*/ + +#include "config.h" + +/* Only needed if compiling with readline support. */ +#ifdef READLINE + +# ifndef HAVE_READ_HISTORY + +#include <stdio.h> +#include <stdlib.h> +#include <string.h> +#include <errno.h> + +/* Replacement for readline's read_history. */ +void +read_history(const char *filename) +{ + FILE *fp; + char *line; + int line_len; + + fp = fopen (filename, "r"); + if (! fp) { + fprintf (stderr, "Unable to read history file %s: %s.", filename, + strerror (errno)); + return; + } + + line = 0; + line_len = 0; + + /* Slurp the history file. If any of the lines contain NULL + characters then anything after that won't be added to the + history but it won't hurt us either. */ + while (getline (&line, &line_len, fp) != -1) { + /* Kill the trailing newline (if any). */ + while (strlen (line) > 0 + && (line[strlen (line) - 1] == '\n' + || line[strlen (line) - 1] == '\r')) + line[strlen (line) - 1] = '\0'; + + if (strlen (line) > 0) + add_history (line); + } + + if (line) + free (line); + + fclose (fp); +} + +# endif /* HAVE_READ_HISTORY */ + +#endif /* READLINE */ --- /dev/null 2004-10-30 17:33:07.000000000 +0100 +++ gnuplot-4.0.0/src/tilde_expand.c 2004-11-20 21:04:26.000000000 +0000 @@ -0,0 +1,104 @@ +/*[ + * Copyright 2004 Neal H. Walfield + * + * Permission to use, copy, and distribute this software and its + * documentation for any purpose with or without fee is hereby + * granted, provided that this permission notice appear in supporting + * documentation. + * + * Permission to modify the software is granted. Permission to + * distribute binaries produced by compiling modified sources is granted, + * provided you + * 1. distribute the corresponding source modifications + * 2. retain our contact information in regard to use of the base + * software. + * Permission to distribute the released version of the source code is + * granted with same provision 2 for binary distributions. + * + * This software is provided "as is" without express or implied warranty + * to the extent permitted by applicable law. + ]*/ + +#include "config.h" + +/* Only needed if compiling with readline support. */ +#ifdef READLINE + +# ifndef HAVE_TILDE_EXPAND + +#include <stdio.h> +#include <string.h> +#include <stdlib.h> +#include <pwd.h> + +/* Replacement for readline's tilde_expand. */ +char * +tilde_expand(const char *path) +{ + if (*path != '~') + /* Does not start with a ~. */ + return strdup (path); + + if (strcmp ("~", path) == 0) + /* Is exactly "~". */ + return strdup (getenv ("HOME")); + + if (strncmp ("~/", path, 2) == 0) { + /* Starts with ~/. */ + + const char *home = getenv ("HOME"); + char *p; + + if (! home) + return strdup (path); + + p = malloc (strlen (home) + 1 + strlen (path) - 2 + 1); + if (! p) { + fprintf (stderr, "malloc failed."); + abort (); + } + + memcpy (p, home, strlen (home)); + memcpy (p + strlen (home), path + 1, strlen (path + 1) + 1); + + return p; + } + + { + /* Must be "~user" or "~user/...". */ + + char *rest = strchr (path, '/'); + int user_len = rest ? rest - (path + 1) : strlen (path + 1); + + struct passwd *pwd; + char *p; + + setpwent (); + + while ((pwd = getpwent ())) { + if (strncmp (path + 1, pwd->pw_name, user_len) == 0) { + p = malloc (strlen (pwd->pw_dir) + 1 + strlen (path) - 2 + 1); + if (! p) { + fprintf (stderr, "malloc failed."); + abort (); + } + + memcpy (p, pwd->pw_dir, strlen (pwd->pw_dir)); + strcpy (p + strlen (pwd->pw_dir), path + 1 + user_len); + + return p; + } + } + + endpwent (); + + if (! pwd) + /* Did not find the user. */ + p = strdup (path); + + return p; + } +} + +# endif /* HAVE_TILDE_EXPAND */ +#endif /* READLINE */ |
From: Hans-Bernhard B. <br...@ph...> - 2004-11-10 12:11:09
|
Scott Beam wrote: > Since the first 'set timefmt' command is negated by the second, wouldn't > it make sense not to include the first one in the example? No. Note the 'set xrange' command uses the format as specified by the first 'set timefmt', not that of the second one. |
From: Scott B. <neu...@ho...> - 2004-11-10 08:08:09
|
I'm not entirely sure if this is the right place to send comments on the documentation, please let me know if it's not. From the perspective of someone new to gnuplot, I found the following example from the 'Time/Date data' section slightly more confusing than necessary: set xdata time set timefmt "%m/%d/%y" set xrange ["03/21/95":"03/22/95"] set format x "%m/%d" set timefmt "%m/%d/%y %H:%M" plot "data" using 1:3 Since the first 'set timefmt' command is negated by the second, wouldn't it make sense not to include the first one in the example? Or is it there for a reason that I'm not seeing? It took me a minute to try and figure out why the program would need both statements, and then a quick test to make sure it doesn't. This change might save time for others. Thanks. -Scott |
From: Roman S. <mi...@ma...> - 2004-10-18 22:04:59
|
hi, please CC me in your answers. system info (for formality): mandrakelinux 10.0 linux 2.6.7 (from scratch) glibc-2.3.3-10mdk gcc-3.3.2-6mdk libfreetype6-devel-2.1.8-1plf libpng3-1.2.5-10mdk libgd and gnuplot was compiled by myself (but the problem was in original mandrake gnuplot-3.7.3 and libgd 2.0.15; with my gnuplot-4.0.0 and libgd 2.0.28) Now I have $ gdlib-config --version --features 2.0.28 GD_XPM GD_JPEG GD_FREETYPE GD_PNG GD_GIF gnuplot from the cvs (20041009). configured with Enable generation of JPEG files Enable generation of GIF files Enable generation of PNG files using gd driver Enable TTF fonts with gd driver OK. The description of the problem: I'm trying to generate png/jpeg files with russian titles and it doesn't work. I can see letters but they are in wrong encoding (latin1 (iso-8859-1) but not right koi8-r) Simple examples: #!/usr/local/bin/gnuplot set encoding koi8r set term postscript set output "test.ps" set title "Синусоида/Sinusoid" plot sin(x) And i can see russian glyphs title in gv. But i need png/jpeg. The following example doesn't work #!/usr/local/bin/gnuplot set encoding koi8r set term png font "/mnt/win_c/windows/Fonts/arial.ttf" set output "test.png" set title "Синусоида/Sinusoid" font "/mnt/win_c/windows/Fonts/arial.ttf,25" plot sin(x) I get test.png with iso8859-1, but the font contains russian glyphs (I can view them in kfontview) My question: is it problem of libgd or gnuplot? And is it possible to fix it? |
From: Roman S. <mi...@ma...> - 2004-10-08 21:54:26
|
From: ccharron1 <cch...@fr...> - 2004-10-02 16:02:52
|
Hello, I'm discovering gnuplot and I'm trying to use it to do some 3D-graph representation of data (real x, y and z graph). As my data are in an excel sheet, it would be very usefull if gnuplot would have an option to import directly the data from an excel file, as a command in a GUI. To be able to select the data file directly from the GUI, without having to write the name in the command line windows would be nice. Also, it could be an idea to developp a Gnuplot excel add-in, I'm sure it should have a lot of success. Are you developping a preference setting to choose the language of Gnuplot ? Thank you for your help Sincerely Christophe |
From: <not...@ss...> - 2004-10-02 13:49:32
|
Thank you for sending a message to SSH Communications Security Corp. This e-mail address is not in use anymore. Please re-send your message to ssh.sales at ssh.com (Please delete the space before and after the "at" letters and also replace "at" with @ mark. We are sorry for this inconvenience, but these steps are necessary to help us avoid SPAM.) You can also view our contact information from: http://www.ssh.com/company/contact/ Thank you for your interest in SSH products. Best Regards, SSH Communications Security Corp. |
From: Alessandro C. <ac...@ti...> - 2004-09-29 18:16:16
|
G N U P L O T Version 3.7 patchlevel 3 last modified Thu Dec 12 13:00:00 GMT 2002 System: MS-Windows 32 bit and G N U P L O T Version 4.0 patchlevel 0 last modified Thu Apr 15 14:44:22 CEST 2004 System: MS-Windows 32 bit Hi, perhaps you already know the problem: when I type the Canc key (used to delete the current character, perhaps Clear in US-keyboard) in an empty line, gnuplot exit! This is dangerous when someone (me!) cancels inadvertently all the characters in the input line, continues to press the Canc key and loses all the work :( Thanks for your great work! Alessandro |
From: Mike L. <oh...@ho...> - 2004-09-16 21:52:11
|
Gentlemen, Under options for line color, you have set up a palette for generating custom colors. (vers. 4.0) There are 16 boxes for storing the custom colors. Thus, the custom colors are supposed to be saved. Yet, as soon as you click on OK, all the custom colors you have generated disappear !! All the work you have done is lost, and the custom colors are gone, and cannot be saved! Is this a known issue? Sincerely, Mike L. Brooklyn, NY |
From: Hans-Bernhard B. <br...@ph...> - 2004-09-06 19:37:07
|
Mike L. wrote: > Under options for line color, you have set up a palette for generating > custom colors. (vers. 4.0) Well, once again you neglected to say what platform you're on, but it certainly looks like you're talking about the MS Windows version. In that case, you're actually barking up the wrong tree. That's not *us* who set up that palette dialog. If you look around a bit, you'll find that this colour chooser dialog is a common to all Windows applications on your box, with only minor variations. It is not, repeat *not*, at all particular to gnuplot, in any way. > Thus, the custom colors are supposed to be saved. Says who? |
From: Mike L. <my...@ne...> - 2004-09-06 19:24:59
|
Gentlemen, Under options for line color, you have set up a palette for generating custom colors. (vers. 4.0) There are 16 boxes for storing the custom colors. Thus, the custom colors are supposed to be saved. Yet, as soon as you click on OK, all the custom colors you have generated disappear !! All the work you have done is lost, and the custom colors are gone, and cannot be saved! Is this a known issue? Sincerely, Mike L. Brooklyn, NY |
From: Hans-Bernhard B. <br...@ph...> - 2004-08-26 13:31:38
|
Remi van Zon wrote: > For some reason, the "online reference manual" does not work!@!!@@## Will you cut down on the shouting and swearing please? Thank you. > but if i do so i get the attached error message and then gnuplot > crashes. I am using an American / English copy of windows 2000 so > nothing very exotic. SO IT SHOULD WORK! And guess what, it does, for apparently everybody else in the world; otherwise we would get reports like yours by the hundreds every week, but we aren't. IIRC, there were problems like the one you're describing with the *first* uploaded binary package of gnuplot-4.0.0 for win32, but we fixed those by re-doing the package months ago. So please try a fresh download. |
From: Remi v. Z. <Rem...@wa...> - 2004-08-26 12:40:26
|
Hello, For some reason, the "online reference manual" does not work!@!!@@## The "welcome screen" tells me to "Type 'help' to access the on-line reference manual." but if i do so i get the attached error message and then gnuplot crashes. I am using an American / English copy of windows 2000 so nothing very exotic. SO IT SHOULD WORK! FIX THIS BUG! Remi |
From: John W. E. <jw...@be...> - 2004-08-18 17:38:08
|
After upgrading to gnuplot 4.0, I've noticed that the y-tic marks crash into the axis when I'm making 3-d plots with the pslatex driver. I also see similar results with the epslatex driver. Here is an example of the gnuplot commands I'm using set nokey set hidden3d set view 30, 145, 1, 1 set xrange [-8:8] set yrange [-6:6] set zrange [-0.2:1] set isosamples 21 set terminal pslatex set output "bug.tex" splot sin(sqrt(x**2+y**2+1e-16))/sqrt(x**2+y**2+1e-16) and the main.tex file: \documentclass{article} \begin{document} \input{bug.tex} \end{document} The TeX part of the bug.tex file includes the lines \put(372,1487){\makebox(0,0)[r]{ 1}}% \put(372,1431){\makebox(0,0)[r]{ 0.8}}% \put(372,1376){\makebox(0,0)[r]{ 0.6}}% \put(372,1320){\makebox(0,0)[r]{ 0.4}}% \put(372,1264){\makebox(0,0)[r]{ 0.2}}% \put(372,1208){\makebox(0,0)[r]{ 0}}% \put(372,1153){\makebox(0,0)[r]{-0.2}}% \put(1351,366){\makebox(0,0){ 4}}% < these labels crash \put(1172,485){\makebox(0,0){ 2}}% < into the y axis \put(994,603){\makebox(0,0){ 0}}% < \put(815,722){\makebox(0,0){-2}}% < \put(636,841){\makebox(0,0){-4}}% < \put(457,960){\makebox(0,0){-6}}% < \put(1815,265){\makebox(0,0)[l]{ 6}}% \put(2006,328){\makebox(0,0)[l]{ 4}}% \put(2198,390){\makebox(0,0)[l]{ 2}}% \put(2389,452){\makebox(0,0)[l]{ 0}}% \put(2581,515){\makebox(0,0)[l]{-2}}% \put(2772,577){\makebox(0,0)[l]{-4}}% \put(2964,639){\makebox(0,0)[l]{-6}}% \put(3155,702){\makebox(0,0)[l]{-8}}% If I use gnuplot 3.7.2, I don't see the problem and the TeX part of the file includes the lines \put(371,1487){\makebox(0,0)[r]{ 1}}% \put(371,1431){\makebox(0,0)[r]{ 0.8}}% \put(371,1376){\makebox(0,0)[r]{ 0.6}}% \put(371,1320){\makebox(0,0)[r]{ 0.4}}% \put(371,1264){\makebox(0,0)[r]{ 0.2}}% \put(371,1208){\makebox(0,0)[r]{ 0}}% \put(371,1153){\makebox(0,0)[r]{-0.2}}% \put(1343,361){\makebox(0,0)[r]{ 4}}% \put(1164,479){\makebox(0,0)[r]{ 2}}% \put(986,598){\makebox(0,0)[r]{ 0}}% \put(807,717){\makebox(0,0)[r]{-2}}% \put(628,836){\makebox(0,0)[r]{-4}}% \put(449,954){\makebox(0,0)[r]{-6}}% \put(1802,279){\makebox(0,0){ 6}}% \put(1994,342){\makebox(0,0){ 4}}% \put(2185,404){\makebox(0,0){ 2}}% \put(2377,466){\makebox(0,0){ 0}}% \put(2568,529){\makebox(0,0){-2}}% \put(2760,591){\makebox(0,0){-4}}% \put(2951,653){\makebox(0,0){-6}}% \put(3143,716){\makebox(0,0){-8}}% Note the change in the way the x and y axis labels are typeset: 3.7.2 4.0 y label \makebox[r]{...} \makebox{...} x label \makebox{...} \makebox[l]{...} Why the change? Thanks, jwe |
From: Mail D. S. <MAI...@ao...> - 2004-08-08 23:25:35
|
Your mail to the following recipients could not be delivered because they are not accepting mail from gnu...@li...: aroseblush |
From: Hans-Bernhard B. <br...@ph...> - 2004-08-08 16:22:17
|
On Thu, 5 Aug 2004, Dave Denholm wrote: > Reginald Beardsley <rb...@su...> writes: > > > In my view, this violates the principle of "least surprise". It > > took me over an hour to figure out why things didn't plot where > > I expected. > > > > plot [x=0:10] x/3+13/3,x/3+13.0/3.0 > > > > I'm quite familiar w/ the rules for integer math, I just had no > > reason to expect integer math rules in this context. > > > > This crops up so often... It's not all *that* often. At least as far as people going public with the question because they didn't find the relevant places in the docs or the FAQ are concerned, the rate this pops up is worthy of a FAQ entry, but not much more than that. Principle of least surprise is not a very good one in this particular case, because what surprises one person is the most natural thing to expect for the other. -- Hans-Bernhard Broeker (br...@ph...) Even if all the snow were burnt, ashes would remain. |
From: Dave D. <dde...@es...> - 2004-08-05 16:52:08
|
Reginald Beardsley <rb...@su...> writes: > In my view, this violates the principle of "least surprise". It > took me over an hour to figure out why things didn't plot where > I expected. > > plot [x=0:10] x/3+13/3,x/3+13.0/3.0 > > I'm quite familiar w/ the rules for integer math, I just had no > reason to expect integer math rules in this context. > This crops up so often... I wonder if it is worth putting in special code to detect division of two integer constants, and warn once per session. (every evaluation would obviously be too often) Just a quick scan over the action table after parsing, to detect the sequence (puchc int), (pushc int), div gnuplot> show at x/3.0 + 10/3 push x pushc 3.0 div pushc 10 pushc 3 div plus Or even - when appending the 'div' action, peek back at the previous two entries. This isn't going to catch the sequence x=13 print x/3 but it might stop the user scratching their head for too long if they then resort to typing in things like print 13/3 dd -- Dave Denholm <dde...@es...> http://www.esmertec.com |
From: Reginald B. <rb...@su...> - 2004-08-04 20:07:11
|
In my view, this violates the principle of "least surprise". It took me over an hour to figure out why things didn't plot where I expected. plot [x=0:10] x/3+13/3,x/3+13.0/3.0 I'm quite familiar w/ the rules for integer math, I just had no reason to expect integer math rules in this context. Reginald H. Beardsley rh...@ac... |
From: <Jim...@pr...> - 2004-07-28 13:37:46
|
I am out of the office today. For urgent matters contact Bob Cooper on 03 9393 5613 or via e-mail: mailto:bob...@pr... Thanks Jim Forsyth |
From: Hans-Bernhard B. <br...@ph...> - 2004-07-27 08:12:30
|
On Mon, 26 Jul 2004, Mike L. wrote: > Gentlemen, following your help instuctions exactly for multiplot, the > following occurs: > > > help > gnuplot> set size 0.7,0.7 > gnuplot> set origin 0.1,0.1 > gnuplot> set multiplot > multiplot> set size 0.4,0.4 > multiplot> set origin 0.1,0,1 > ^ > ';' expected > SOMETHING IS WRONG! Yes. Two things, actually. 1st of all, there's an actual error in your command line (a ',' where you wanted to type a '.'). Second, the '^' character of the error is misaligned, so it points at the wrong ','. > The tracer (x,y values shown in lower left) could be easily modified to > add a wonderful feature! If there were some way to set the y value to > zero, with the cursor at the x intercept, then gnuplot would > automatically find the roots of equations! [Please keep separate issues in separate mails, and hit <return> every once in a while --- that entire paragraph arrived here as a single long line.] That has nothing to do with the "tracer", because the position it reports is that of the mouse only. It has nothing to do with the function(s) plotted --- for many kinds of graphs made by gnuplot, that would be a meaningless concept. -- Hans-Bernhard Broeker (br...@ph...) Even if all the snow were burnt, ashes would remain. |
From: Shigeharu T. <sh...@ie...> - 2004-07-27 05:29:59
|
shige 07/27 2004 ---------------- In Postscript terminal, '\\' is treated with some differences between enhanced and noenhanced. In PS_put_text() of term/post.trm, it will be '\\' + '\\' and may be fine in PS file. On the oter hand, ENHPS_put_text() puts 1) '\\' if the next character is '\\' or '(' or ')', 2) '\\' + octal if the following 3 charcters are octal, 3) none otherwise. I think the behavior 3) is not so good. The following patch for src/term.c of gnuplot-4.0.0 solves it, but it may cause other problem (I don't know well). ----- From here ----- --- src/term.c.ORG Wed Apr 14 02:24:02 2004 +++ src/term.c Tue Jul 27 12:35:45 2004 @@ -2270,6 +2270,14 @@ } break; } + else{ + if (term->flags & TERM_IS_POSTSCRIPT){ + (term->enhanced_open)(fontname, fontsize, base, widthflag, showflag, overprint); + (term->enhanced_writec)('\\'); + (term->enhanced_writec)('\\'); + } + break; + } ++p; /* HBB 20030122: Avoid broken output if there's a \ ----- To here ----- +========================================================+ Shigeharu TAKENO NIigata Institute of Technology kashiwazaki,Niigata 945-1195 JAPAN sh...@ie... TEL(&FAX): +81-257-22-8161 +========================================================+ |
From: Mike L. <my...@ne...> - 2004-07-26 21:45:11
|
----- Original Message -----=20 From: Mike L.=20 To: gnuplot bugs,suggst,mods=20 Sent: Monday, July 26, 2004 1:32 PM Subject: a bug and sugggestion Gentlemen, following your help instuctions exactly for multiplot, the = following occurs: > help gnuplot> set size 0.7,0.7 gnuplot> set origin 0.1,0.1 gnuplot> set multiplot multiplot> set size 0.4,0.4 multiplot> set origin 0.1,0,1 ^ ';' expected =20 SOMETHING IS WRONG! Also a suggestion: The tracer (x,y values shown in lower left) could be easily modified to = add a wonderful feature! If there were some way to set the y value to = zero, with the cursor at the x intercept, then gnuplot would = automatically find the roots of equations! Wouldn't that be something!? Sincerely, Mike L.=20 Brooklyn,NY |
From: Mike L. <oh...@ne...> - 2004-07-26 18:42:37
|
Gentlemen, following your help instuctions exactly for multiplot, the = following occurs: > help gnuplot> set size 0.7,0.7 gnuplot> set origin 0.1,0.1 gnuplot> set multiplot multiplot> set size 0.4,0.4 multiplot> set origin 0.1,0,1 ^ ';' expected =20 SOMETHING IS WRONG! Also a suggestion: The tracer (x,y values shown in lower left) could be easily modified to = add a wonderful feature! If there were some way to set the y value to = zero, with the cursor at the x intercept, then gnuplot would = automatically find the roots of equations! Wouldn't that be something!? Sincerely, Mike L.=20 Brooklyn,NY |
From: Harald K. <ko...@sc...> - 2004-07-20 17:30:01
|
On Jul 20, Hans-Bernhard Broeker wrote: > > # ifdef _SETJMP_H > > ==> __png.h__ already includes setjmp.h; > > ==> __dont__ include it again.; > > I consider this fragment a case of raging insanity on libpng's side. > It's none of their business to tell other people's source which ANSI/ISO > standard library headers it's allowed to include and which not. totally agreed -- I've just asked them to change that code.... but nevertheless, I think gnuplot sources should be prepared to allow compilation with that ugly, but (yet) existing png header file. > The solution, if any, has to be achieved elsewhere. Gnuplot's source can > at best implement a workaround, and I don't see why we should modify > perfectly nice code to accomodate such utter silliness in other people's > works. IMHO the one and main reason to change gnuplot's sources "for now" (until libpng-1.2.6 will be released -- cross fingers:) is to help other users to compile/use gnuplot... > > - same color sequuence for line types > > Supposed to already be the case, to a large extent. And then there's the > issue of X11 colours being overridable by the user --- with no effect > to PS and PDF, or any other terminals for that matter. here I'd be very pragmatic -- I won't care about application default settings for X11, if only the out-of-the-box defaults would match. > > - same symbol shape sequuence > > That's going to be hard or impossible. PS has a lot more point symbols, > some of which (the opaque ones) may note even be portable to X11. symbol shape has lower priority compared to color, page size etc. but still I think it would be "nice to have" similar shapes at least for a set of the first ~8-16 symbols... > > - same line hashes > > - same page/plot size > > What could 'page size' possibly mean to X11? nothing of course;-) page size is just a matter for PS vs. PDF (for the set of drivers I care about:) > I personally don't see much to gain by making the colour sequences exactly > equal --- that'd be a pointless exercise anyway unless we were to integrate > a calibrated color managment system. it's not about making them _exactly_ the same, but _similar_: an example: pretty often I plot lots of different data sets of some measurements, adding curve fittings, error information etc. so I need a lot of different colors. for a presentation with a beamer (and for printing on color printers), the by far biggest problem is _yellow_ -- it's almost invisible in all cases. on X11, all colors are dark/bright enough to be visible, only colors #7 and #8 (orange and coral) are a bit similar and not really easy to distinuish. but once I produce a PS file (converted to PDF so far), color #6 gets yellow and I can't use it anymore. now, if I want to produce PDF, I have to choose #7 as "blind color" for white background, which can't be used anymore and I have to rework all my plot scripts again... and if I switch back from PDF presentation to "online" work with gnuplot, the color legend again changes which is pitty (pretty often colors have a fixed meaning and displaying the same data with different colors is very disturbing). and if I finally want to produce some PNG images or whatever for a web presentation, I'd guess that I get yet another color set (well, actually I've seen in the source code that PNG seems to use web colors too -- but I haven't tried and tested it so far;-) next problem shows up, if I try to refer to parts of a diagram in texts by colors of the idems, talking about "that red line" and "blue error bars" which can be color 9/11 for X11, 10/12 for PS and whatever for PDF... anyway, thanks for your quick answer and comments! Harald Koenig -- "I hope to die ___ _____ before I *have* to use Microsoft Word.", 0--,| /OOOOOOO\ Donald E. Knuth, 02-Oct-2001 in Tuebingen. <_/ / /OOOOOOOOOOO\ \ \/OOOOOOOOOOOOOOO\ \ OOOOOOOOOOOOOOOOO|// Harald Koenig \/\/\/\/\/\/\/\/\/ science+computing ag // / \\ \ ko...@sc... ^^^^^ ^^^^^ |
From: Hans-Bernhard B. <br...@ph...> - 2004-07-20 16:39:37
|
On Tue, 20 Jul 2004, Harald Koenig wrote: > 1) PDFlib-6.0.0 is missing PDF_open_fp() This is known, and already taken care of in the CVS version. > 2) sequence of "png.trm" and "pdf.trm" in src/term.h: > > on some Linux boxes compilation bombs because of the following code > in pngconf.h of my copy of libpng sources: [...] > # ifdef _SETJMP_H > ==> __png.h__ already includes setjmp.h; > ==> __dont__ include it again.; I consider this fragment a case of raging insanity on libpng's side. It's none of their business to tell other people's source which ANSI/ISO standard library headers it's allowed to include and which not. > changing the ordering in term.h (png before pdf) seems to be the > most portable solution to me (see src/term.h diff below). The solution, if any, has to be achieved elsewhere. Gnuplot's source can at best implement a workaround, and I don't see why we should modify perfectly nice code to accomodate such utter silliness in other people's works. > 3) "char" argument and pre-ANSI-C (K&R) functions without prototypes: Known and taken care of in CVS sources. > 4) PDF output and acroread > > maybe you can remember my mail [...] > about landscape vs. portrait printing of gnuplot-PDF files with acroread ? Dimly --- I think I threw it in the TODO jar back then because nobody seemed to know how to fix that one. Now that you found out, we can do something about it. Thanks. > (5) whish list:: PDF vs. postscript/X11 driver output "compatibility" > > it would be great, if at least the X11, postscript and PDF drivers would > generate similar/compatible output for the same gnuplot command file > and try match the visual appearence. that is, they use > > - same color sequuence for line types Supposed to already be the case, to a large extent. And then there's the issue of X11 colours being overridable by the user --- with no effect to PS and PDF, or any other terminals for that matter. > - same symbol shape sequuence That's going to be hard or impossible. PS has a lot more point symbols, some of which (the opaque ones) may note even be portable to X11. > - same line hashes > - same page/plot size What could 'page size' possibly mean to X11? I personally don't see much to gain by making the colour sequences exactly equal --- that'd be a pointless exercise anyway unless we were to integrate a calibrated color managment system. -- Hans-Bernhard Broeker (br...@ph...) Even if all the snow were burnt, ashes would remain. |