[gnuplot5] 01/05: Imported Upstream version 5.0~rc3

Anton Gladky gladk at moszumanska.debian.org
Tue Nov 18 19:00:39 UTC 2014


This is an automated email from the git hooks/post-receive script.

gladk pushed a commit to branch master
in repository gnuplot5.

commit 3071bf2a30e5a3004c9ccd243935f86ecffb3370
Author: Anton Gladky <gladk at debian.org>
Date:   Tue Nov 18 19:10:14 2014 +0100

    Imported Upstream version 5.0~rc3
---
 BUGS                                    |    2 +-
 ChangeLog                               |  376 +++++++++
 NEWS                                    |   22 +-
 PATCHLEVEL                              |    2 +-
 RELEASE_NOTES                           |   62 +-
 config/config.os2                       |    2 +
 config/makefile.dj2                     |    8 +-
 config/makefile.emx                     |    7 +-
 config/makefile.vms                     |    8 +-
 configure                               |   41 +-
 configure.in                            |   36 +-
 configure.vms                           |    4 +-
 demo/fit.dem                            |   67 +-
 demo/gantt.dem                          |    9 +-
 demo/plugin/Makefile                    |    6 +-
 demo/stringvar.dem                      |   24 +
 demo/timedat.dem                        |   21 +-
 demo/world.dem                          |    8 +-
 docs/Makefile.am                        |    4 +-
 docs/Makefile.in                        |    4 +-
 docs/doc2texi.el                        |    4 +-
 docs/faq-ja.tex                         | 1314 +++++++++++++------------------
 docs/gnuplot.doc                        |  546 ++++++++-----
 docs/plotstyles.gnu                     |  148 +++-
 docs/term-ja.diff                       |  325 ++++----
 man/gnuplot-ja.1                        |    4 +-
 share/LaTeX/gnuplot-lua-tikz-common.tex |    5 +-
 share/LaTeX/gnuplot-lua-tikz.sty        |    4 +-
 src/Makefile.in                         |    4 +-
 src/axis.c                              |   38 +-
 src/axis.h                              |   26 +-
 src/datafile.c                          |   40 +-
 src/fit.c                               |   74 +-
 src/fit.h                               |    3 +-
 src/gadgets.c                           |    6 +-
 src/gplt_x11.c                          |   15 +-
 src/graph3d.c                           |   41 +-
 src/graphics.c                          |   23 +-
 src/hidden3d.c                          |   31 +-
 src/internal.c                          |   15 +-
 src/interpol.c                          |   14 +-
 src/makefile.all                        |    4 +-
 src/makefile.awc                        |    4 +-
 src/misc.c                              |  103 ++-
 src/mouse.c                             |   42 +-
 src/parse.c                             |   10 +-
 src/parse.h                             |    5 +-
 src/plot2d.c                            |   30 +-
 src/plot3d.c                            |    8 +-
 src/qtterminal/QtGnuplotScene.cpp       |    6 +
 src/qtterminal/qt_term.cpp              |   10 +-
 src/qtterminal/qt_term.h                |    2 +-
 src/save.c                              |   99 ++-
 src/save.h                              |    4 +-
 src/set.c                               |  186 +++--
 src/setshow.h                           |   19 +-
 src/show.c                              |   67 +-
 src/stats.c                             |   73 +-
 src/term.c                              |    8 +-
 src/term.h                              |    8 +-
 src/term_api.h                          |   12 +-
 src/time.c                              |  123 ++-
 src/unset.c                             |   24 +-
 src/version.c                           |    4 +-
 src/wxterminal/wxt_gui.cpp              |  149 +++-
 src/wxterminal/wxt_gui.h                |   16 +-
 src/wxterminal/wxt_term.h               |    5 +-
 term/Makefile.am                        |   19 +-
 term/Makefile.in                        |   19 +-
 term/README                             |    8 +-
 term/aed.trm                            |  224 ------
 term/caca.trm                           |   11 +-
 term/cairo.trm                          |    4 +-
 term/js/gnuplot_mouse.js                |    6 +-
 term/lua.trm                            |   54 +-
 term/lua/gnuplot-tikz.help              |    4 +-
 term/lua/gnuplot-tikz.lua               |  200 +++--
 term/v384.trm                           |  207 -----
 term/win.trm                            |   66 +-
 term/wxt.trm                            |    3 +-
 term/x11.trm                            |    8 +-
 81 files changed, 2946 insertions(+), 2301 deletions(-)

diff --git a/BUGS b/BUGS
index cf40898..b62eba0 100644
--- a/BUGS
+++ b/BUGS
@@ -1,5 +1,5 @@
 Please see and use
 
-	http://sourceforge.net/tracker/?atid=102055&group_id=2055&func=browse
+	http://sourceforge.net/p/gnuplot/bugs/
 
 for an up-to-date bug tracking system.
diff --git a/ChangeLog b/ChangeLog
index 157c5b0..42fcb6b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,379 @@
+2014-11-12 Ethan A Merritt  <merritt at u.washington.edu>
+
+	* bump patchlevel identifier to -rc3
+
+2014-11-11 Ethan A Merritt  <merritt at u.washington.edu>
+
+	* src/term_api.h term/README:  Add a 2nd parameter to the interface for
+	term->modify_plots(operations, plotno). All terminals for which this
+	entry point is not NULL must be updated accordingly.  This patch does
+	not by itself add any new functionality or user-visible change.
+	Better to make this change now rather than after release of 5.0 since it
+	breaks compatibility between core code and outboard drivers.
+
+	* src/mouse.c src/gplt_x11.c term/caca.trm term/win.trm term/x11.trm
+	src/qtterminal/QtGnuplotScene.cpp src/qtterminal/qt_term.*
+	src/wxterminal/wxt_gui.cpp src/wxterminal/wxt_term.h:
+	Update term->modify_plots() entry in the terminals that provide it.
+
+2014-11-07 Akira Kakuto <kakuto at fuk.kindai.ac.jp>
+
+	* term/luz/gnuplot-tikz.lua:  Use \errmessage rather than \PackageError
+	because not all TeX variants provide the latter.
+
+2014-11-07 Ethan A Merritt  <merritt at u.washington.edu>
+
+	Timefmt revision part 1 of 7
+	* src/axis.c src/axis.h src/datafile.c src/fit.c src/mouse.c src/parse.c
+	src/save.c src/set.c src/setshow.h src/show.c src/unset.c
+	docs/gnuplot.doc demo/gantt.dem:
+
+	- Remove axis->timefmt and replace it with a single global timefmt.
+	  This is what the documentation has always said, but it breaks the
+	  undocumented command:   set timefmt y "fmt-different-from-xaxis-fmt"
+	- Add a new flag axis->tictype to control interpretation of tic format.
+	  axis->datatype will continue to control input format interpretation. 
+
+	Timefmt revision part 2 of 7
+	* src/save.c src/save.h src/setshow.h src/show.c:
+
+	- Replace macro SAVE_NUM_OR_TIME with routine save_num_or_time_input().
+	  This routine uses _input_ data format, mostly for reporting axis range.
+
+	Timefmt revision part 3 of 7
+	* src/save.c src/save.h src/show.c:
+
+	- Show and save xyz positions using time-format coordinates when needed.
+	  Note that like axis ranges, these are meant to be read in again later.
+	  Thus they are written using the input format not the output format.
+
+	Timefmt revision part 4 of 7
+	* src/axis.c (get_tics copy_or_invent_formatstring) src/set.c
+	src/unset.c src/show.c src/save.c docs/gnuplot.doc demo/world.dem:
+
+	- New command set {xyz}tics {time|geographic|numeric} sets axis->tictype
+	- Output formats chosen based on axis->tictype rather than axis->datatype
+	- Report axis->tictype setting with axis->format in "show" and "save"
+
+	Timefmt revision part 5 of 7
+	* src/datafile.c src/parse.c:
+
+	- Track how many parameters were passed to timecolumn(), so that
+	  version 4 behavior can be emulated when only 1 parameter is passed.
+
+	Timefmt revision part 6 of 7
+	* src/axis.h src/set.c:
+
+	- Add the tictype keywords to set format {axis} {time|geographic|numeric}
+	- Reset to numeric on "unset format"
+
+	Timefmt revision part 7 of 7
+	* src/time.c (gstrftime xstrftime) docs/gnuplotdoc demo/timedat.dem:
+
+	Introduce a new time format modifier 't', used to distinguish dates
+	from times.  This allows formatting time data as hours/minutes/seconds
+	relative to time=0 rather than as a calendar date.  Compare these
+	representations of the stored value -3672.50 seconds:
+	    default date format    # "12/31/69 \n 22:58"
+	    format "%tH:%tM:%tS"   # "-01:01:12"
+	    format "%.2tH hours"   # "-1.02 hours"
+	    format "%tM:%.2tS"     # "-61:12.50"
+
+2014-11-07  Daniel J Sebald <daniel.sebald at ieee.org>
+
+	* src/wxterminal/wxt_gui.{cpp|h}:  Add a toolbar widget on the wxt
+	terminal to export current plot to a PNG, SVG, or PDF file.
+
+2014-11-04 Ethan A Merritt  <merritt at u.washington.edu>
+
+	* src/datafile.c (f_dollar f_column):  When a data field containing NaN
+	is encountered, df_readline returns DF_UNDEFINED to the caller.
+	This is sufficient to handle plotting that point per se, but if the
+	value is also used in evaluation of an arithmetic expression with a side
+	effect then this undefined status flag is not available. For consistency
+	we now pass NaN to the expression evaluation code as well.  E.g.
+		plot FOO using 1:(side_effect=f($2))
+	could leave some random (probably left-over) value in side_effect.
+	Now if $2 is NaN and for example f(x) = (x+foo) then side_effect becomes
+	NaN also.  Before this side_effect would have received some other,
+	incorrect, numerical value.
+
+	* src/save.c (save_dashtype):  dashtype -1 is an internal flag; do not
+	save it to an external file.
+
+2014-11-01 Ethan A Merritt  <merritt at u.washington.edu>
+
+	* term/cairo.trm (cairotrm_put_text) src/wxterminal/wxt_gui.cpp
+	(wxt_put_text):  Start each top level enhanced text recursion  using
+	the full font name given in "set term font 'foo'", rather than the
+	most recent font stored in the plot (which is only the font family
+	name, not bold/italic/other).  This maintains bold or italic in the
+	original font name, but I am not entirely convinced that it cannot
+	overwrite an intentional change in font family.
+	Bug #1505
+
+2014-10-31 Ethan A Merritt  <merritt at u.washington.edu>
+
+	* src/plot2d.c:  Issue a warning if someone tries to specify a
+	sampling range for a data plot.
+	Bug #1510
+
+2014-10-31  Bastian Maerkisch  <bmaerkisch at web.de>
+
+	* src/wxterminal/wxt_gui.cpp (wxtFrame::OnSize):  Only replot on
+	resize if the wxt settings were properly initialized by wxt_init().
+	On Windows, this would otherwise cause many graph windows to be
+	opened when the first plot command is issued and gnuplot finally
+	hangs or crashes.
+	Bugfix.
+
+2014-10-29  Christoph Bersch <usenet at bersch.net>
+
+	* term/lua/gnuplot-tikz.lua term/luz.trm:  Boxed text support.
+
+2014-10-26 Ethan A Merritt  <merritt at u.washington.edu>
+
+	* term/wxt.trm src/wxterminal/wxt_term.h src/wxterminal/wxt_gui.*:
+	Add a checkbox to the tool widget controlling whether or not the
+	plot is redrawn via "replot" as the terminal window is resized.
+
+2014-10-19  Christoph Bersch <usenet at bersch.net>
+
+	* term/lua/gnuplot-tikz.lua:  Missing initializations.
+	Bug #1503
+
+2014-10-16  Christoph Bersch <usenet at bersch.net>
+
+	* src/stats.c:  The stats code was confusing the x and y dimensions of
+	matrix data.  E.g. it would report a 5X7 matrix as being 7X5, and 
+	mis-calculate the indices of the min/max values.
+	Bug #1501
+
+	* term/lua/gnuplot-tikz.lua:  Fix incorrect font test.
+	Bug (Feature Request) #409
+
+2014-10-16  Bastian Maerkisch  <bmaerkisch at web.de>
+
+	* src/win/wgraph.c src/win/wgidplus.c:  Accept zero point size.
+	Eliminates drawing of unwanted point symbols for labelled contours.
+	Bugfix
+
+	* src/win/wgnuplib.h src/win/wgraph.c term/win.trm:  The `size` option
+	now refers to the canvas size instead of the window size in order to be
+	consistent with the qt and wxt terminals.  The window size can still be
+	set with the new `wsize` option. Settings are now included in output of
+	`show term`.
+	Bug #1400
+
+	* src/win/wgraph.c term/win.trm:  The windows terminal allowed users
+	to change linetypes via an ini file or with the help of a dialog.  This
+	has been superseeded by the more general `set linetype` mechanism.
+	The old code is still available but only active with WIN_CUSTOM_PENS
+	defined during compilation.
+
+2014-10-11  Christoph Bersch <usenet at bersch.net>
+
+	* term/lua/gnuplot-tikz.lua:  LT_AXIS and LT_SOLID imply specific
+	dash types.
+	Bug #1491
+
+2014-10-11  Hans-Bernhard Broeker  <broeker at physik.rwth-aachen.de>
+
+	* src/axis.c (copy_or_invent_formatstring): Lower end of axis may
+	need more precision in invented format than the distance between
+	max and min. Bug #1496
+
+2014-10-08 Ethan A Merritt  <merritt at u.washington.edu>
+
+	* src/save.c (save_all): Write out the filename last used for plotting.
+	This makes a saved plot command referencing '' slightly more useful.
+
+2014-10-07 Ethan A Merritt  <merritt at u.washington.edu>
+
+	* src/misc.c (lf_push lf_pop):  If lf_push/lf_pop are invoked from
+	do_string_and_free to handle bracketed if{} or do{} expressions, they
+	should not touch the call arguments ARG1, ARG2, ...  Save/restore of the
+	call arguments is only needed if lf_push/lf_pop are invoked by "call".
+	Bug #1494
+
+2014-10-03  Christoph Bersch <usenet at bersch.net>
+
+	* term/lua/gnuplot-tikz.lua:  linetype -1 must reset dashtype to solid.
+	Bug #1491
+
+2014-10-01 Ethan A Merritt  <merritt at u.washington.edu>
+
+	* src/misc.c (arrow_parse): Remove order dependence of "fixed" keyword.
+
+	* src/hidden3d.c (draw_edge): When an arrow is split into segments by
+	hidden surface processing, only keep the arrowhead on the original tip.
+
+	* src/plot2d.c (get_data): Timedata for HISTOGRAMS requires a special
+	case.
+
+	* term/aed.trm term/v384.trm
+	config/makefile.dj2 config/makefile.emx config/makefile.vms
+	configure.vms docs/doc2texi.el docs/Makefile.am src/makefile.all
+	src/makefile.awc src/term.h:
+
+	Remove obsolete terminals:
+	aed:  pre-1980 display device ($15,000) with 500x500 pixels, 256 colors
+	v384: Vectrix VX 384 mid 1980s graphics display terminal ($5000) with
+	      672x480 pixels, 512 colors
+
+	* docs/gnuplot.doc:  Replace outdated section on `set xdata time`.
+
+2014-09-26 Ethan A Merritt  <merritt at u.washington.edu>
+
+	* term/js/gnuplot_mouse.js:  Typo in logical test for hypertext.
+
+	* src/axis.h src/save.c src/set.c src/show.c src/unset.c src/graphics.c
+	src/graph3d.c:   set [*]tics {{no}enhanced}
+
+2014-09-24 Ethan A Merritt  <merritt at u.washington.edu>
+
+	* src/interpol.c:  Force the number of intervals used for interpolating
+	monotonic cubic splines ("smooth mcsplines") to be at least twice the
+	number of data points.
+
+2014-09-22  Christoph Bersch <usenet at bersch.net>
+
+	* src/misc.c (parse_fillstyle): Remove order dependence of keyword 
+	"transparent".
+
+	* term/lua.trm term/lua/gnuplot-tikz.lua:
+	Support RGBA linecolors and LT_NODRAW.  Add a linewidth terminal option.
+
+2014-09-20  Bastian Maerkisch  <bmaerkisch at web.de>
+
+	* src/fit.c src/fit.h src/save.c src/set.c src/show.c src/unset.c
+	docs/gnuplot.doc demo/fit.dem:  Remove xerrors option (which requires 3
+	columns) since it is not like the xerrorbars plot style (which requires 4). 
+	Rename `noerrors` option to `unitweights`.  Let the fit command default
+	to `unitweights`, i.e. do not interpret the last column of the using
+	spec as z-errors.  Add a command `set fit v4|v5` to switch between
+	old-style command line syntax and the new one. Default to `v5`, but
+	`reset` does not change the current setting.
+
+	Note that this change is backward-incompatible with v5-rc1 and v5-rc2.
+	However it restores compatibility with v4, subject to the restriction
+	that v4 syntax is only recognized if all independent variables appear
+	in the "fit" command itself (see below).
+
+	* src/fit.c: Ethan A Merritt - use the tally of dummy variable names
+	to detect version 4 syntax in which the last column of a using spec
+	contains zerror but no "*error" keyword is provided.
+
+2014-09-18 Ethan A Merritt  <merritt at u.washington.edu>
+
+	* src/datafile.c:  Revised error message for datafile open failure.
+
+	* src/fit.c src/parse.c src/parse.h (int fit_dummy_var[]):
+	Track the occurrence of dummy variable names in a fit command. This lets
+	us count the independent variables so long as they are not obscured.
+	   fit f(x,y) 'data' using 1:2:3:4      # flags use of 'x' and 'y'
+	   fit x*y    'data' using 1:2:3:4      # flags use of 'x' and 'y'
+	   g(x) = x*y;
+	   fit g(x)   'data' using 1:2:3:4      # flags 'x', doesn't notice 'y'
+	In each case fit_dummy_var[0] is 1.  In the 3rd case fit_dummy_var[1]
+	is 0 but should be 1.  Fixing this would be quite hard.
+
+2014-09-14  Bastian Maerkisch  <bmaerkisch at web.de>
+
+	* src/mouse.c (xDateTimeFormat):  Use gnuplot's own ggmtime() instead
+	of gmtime() to avoid platform dependant restrictions. Fixes display of
+	dates before 1970 and after 2038 in the status bar on Windows.
+	Bug #1470
+
+2014-09-09  Pieter-Tjerk de Boer <p.t.deboer at utwente.nl>
+
+	* docs/gnuplot.doc:  Update help on fit to new command syntax.
+
+2014-09-09  Akira Kakuto <kakuto at fuk.kindai.ac.jp>
+
+	* src/win/wpause.c (PauseBox):  Do not wait for further events after
+	pause dialog box was closed. Bugfix.
+
+2014-09-08  Christoph Bersch <usenet at bersch.net>
+
+	* demo/stringvar.dem docs/gnuplot.doc src/internal.c (f_word f_words):
+	Modify the word() and words() functions to recognize quoted strings
+	inside the top level string as single entities.
+
+2014-09-08  Christoph Junghans <ottxor at users.sourceforge.net>
+
+	* configure.in:  New option --without-libcerf
+
+2014-09-08 Ethan A Merritt  <merritt at u.washington.edu>
+
+	* src/misc.c (lp_parse parse_colorspec):  Allow a quoted colorname to
+	immediately follow the keywords lc|linecolor|fc|fillcolor; i.e. in this
+	case the additional rgbcolor keyword is optional.
+
+2014-09-08  Shigeharu Takeno  <shige at iee.niit.ac.jp>
+
+	* docs/gnuplot.doc docs/term-ja.diff docs/gnuplot-ja.doc
+	man/gnuplot-ja.1:  Sync Japanese documentation to 1.902.2.5
+
+2014-09-07 Ethan A Merritt  <merritt at u.washington.edu>
+
+	* src/plot2d.c:  "set linetype 1 pt 'A'; plot x with lp" requires that
+	the plot->labels field be initialized before plotting.
+
+	* src/save.c:  handle PT_CHARACTER when saving linetype
+
+2014-09-05 Ethan A Merritt  <merritt at u.washington.edu>
+
+	* src/term_src/api.h src/gadgets.c src/hidden3d.c src/misc.c
+	src/plot2d.c src/plot3d.c src/save.c src/set.c src/ show.c src/term.c:
+
+	The field lp_style_type.pointflag was variously used as a Boolean,
+	an integer, or a magic number indicating an uninitialized state.
+	Clean this up by replacing it with a bitfield lp_style_type.flags
+	with defined bits LP_SHOW_POINTS LP_NOT_INITIALIZED LP_EXPLICIT_COLOR.
+	This has the side effect of allowing a trivial fix for a regression
+	in 4.6.5 that caused "set hidden3d; splot ... lc <foo>" to ignore the
+	requested color.  See Bugs #1284 #1475
+
+2014-09-05  Karl Ratzsch  <ratzsch at uni-freiburg.de>
+
+	* docs/plotstyles.gnu:  Dummy up a version of the missing/NaN figure
+	for use with Windows documentation.
+
+2014-09-04 Ethan A Merritt  <merritt at u.washington.edu>
+
+	* src/graphics.c (place_arrows) src/graph3d.c (place_arrows3d):
+	Revert arrowhead patch of 2014-08-18.  Document that if you want a
+	dashed arrow shaft it is best to use "nofilled" for the arrow head.
+	Bugs #1460 #1476
+
+2014-09-03  Ethan A Merritt  <merritt at u.washington.edu>
+
+	* src/graph3d.c src/hidden3d.c:  "splot ... with dots" was not drawing
+	the dots.
+	Bug #1474
+
+2014-08-31  Ethan A Merritt  <merritt at u.washington.edu>
+
+	* src/stats.c docs/gnuplot.doc:  Calculate and report sample standard
+	deviation (STATS_ssd) as well as the population standard deviation 
+	(STATS_stddev).  Provide formulae for the reported quantities in the
+	LaTeX documentation, and document the difference between
+	_ssd and _stddev in all documentation formats.
+
+	* src/stats.c:  In version 5 when there is no using spec df_readline()
+	always returns at most the number of columns present on the first line.
+	Bug #1472
+
+2014-08-30  Petr Mikulik  <mikulik at physics.muni.cz>
+
+	* config/config.os2: Use _strtoll.
+
+2014-08-29  Petr Mikulik  <mikulik at physics.muni.cz>
+
+	* src/gplt_x11.c (exec_cmd process_configure_notify_event):
+	Add missing #ifdefs: USE_X11_MULTIBYTE and PIPE_IPC.
+
 2014-08-28  Ethan A Merritt  <merritt at u.washington.edu>
 
 	* Prepare release notes for 5.0.rc2
diff --git a/NEWS b/NEWS
index 4e557cc..85a7ef3 100644
--- a/NEWS
+++ b/NEWS
@@ -1,6 +1,26 @@
-Changes since 5.0.rc1
+Changes in 5.0.rc3
 =====================
 
+* NEW new command set {xyz}tics {timedate|geographic|numeric} sets axis->tictype
+* NEW add the tictype keywords to set format {axis} {time|geographic|numeric}
+* NEW format modifier 't' in timedate mode indicates a time rather than a date
+* NEW export-to-file toolbar widget for wxt terminal
+* CHANGE separate input format (axis->datatype) and output format (axis->tictype)
+* CHANGE report and save xyz position using time coordinates if appropriate
+* CHANGE emulate v4 syntax for timecolumn(<single-param>)
+* CHANGE revised v5 "fit" syntax does not match -rc1 and -rc2
+* CHANGE auto-detect and accept v4 "fit" syntax
+* CHANGE remove obsolete terminals aed and v384
+* FIX "splot ... with dots" was not drawing the dots
+* FIX revert arrowhead changes introduced in -rc1
+* FIX lua terminal support for LT_NODRAW, RGBA linecolors
+* FIX stats code was confusing x- and y- dimensions of matrix data
+* FIX track :Italic and :Bold given in "set term" for cairo terminals
+* FIX if $2 is NaN, plot FOO using 1:(oops=f($2)) should set oops to NaN
+
+Changes in 5.0.rc2
+==================
+
 * NEW grey out key entries when corresponding plot is toggled off
 * NEW allow parenthesized expressions as call parameters
 * NEW set margins <left>, <right>, <top>, <bottom>
diff --git a/PATCHLEVEL b/PATCHLEVEL
index 59619e7..c215c76 100644
--- a/PATCHLEVEL
+++ b/PATCHLEVEL
@@ -1 +1 @@
-rc2
+rc3
diff --git a/RELEASE_NOTES b/RELEASE_NOTES
index 2a9d080..9d8be4b 100644
--- a/RELEASE_NOTES
+++ b/RELEASE_NOTES
@@ -1,14 +1,14 @@
-		GNUPLOT Version 5.0.rc2 Release Notes
+		GNUPLOT Version 5.0.rc3 Release Notes
 		=====================================
 
-We are happy to announce a second release candidate for gnuplot version 5. 
-Version 5 will be a major release with significant new capabilities
-and enhancements compared to previous gnuplot versions.
+We are happy to announce the third (and final) release candidate for
+gnuplot version 5.  Version 5 will be a major release with significant
+new capabilities and enhancements compared to previous gnuplot versions.
 
 Please see the NEWS file for bugfixes and minor changes between version 5
-release candidates -rc1 and -rc2.
+release candidates -rc1, -rc2, and -rc3.
 
-Release Notes date: 27 August 2014
+Release Notes date: 11 November 2014
 
 NOTABLE NEW FEATURES
 ====================
@@ -22,6 +22,10 @@ NOTABLE NEW FEATURES
   Final covariance terms are stored in user-accessible variables.
   Fitting options are now controlled by the command "set fit ..." rather than
   by environmental variables.
+
+* The interpretation of columns in a "fit" command depends on new keywords
+  "error", "xyerror", "zerror".  In most cases the program can also recognize
+  version 4 syntax (no error keyword but last column contains zerror).
   
 * The dot/dash pattern of a line can now be controlled independently
   from other properties using the keyword "dashtype".
@@ -97,6 +101,15 @@ A brief summary of potentially incompatible changes is given here.
   determined using the command `print strftime("%F",0)`.
   Time is now stored to at least millisecond precision.
 
+* The function `timecolumn(N,"timeformat")` now has 2 parameters.
+  Because the second parameter is not associated with any particular data axis,
+  this allows using the `timecolumn` function to read time data for reasons
+  other than specifying the x or y coordinate.  Use of time formats
+  to generate axis tick labels is now controlled by "set {xy}tics time" rather
+  than by "set {xy}data time".  Thus prior calls to `set xdata time` or
+  `set timefmt x` are unnecessary for either input or output.
+  These older commands may be deprecated in the final 5.0 release.
+
 * The "reverse" keyword (e.g. "set xrange [*:*] reverse") now affects only
   autoscaling.  It has no effect on explicit ranges. 
   "set xrange [0:1] reverse" is _not_ the same as "set xrange [1:0]".
@@ -109,11 +122,6 @@ A brief summary of potentially incompatible changes is given here.
   variable.  Use the command "set dummy ..." to assign names to fit variables
   3 ... 12.
 
-* The function `timecolumn(N,"timeformat")` now has 2 parameters.
-  Because the required second parameter is not associated with a particular
-  data axis, this allows using the `timecolumn` function to read time data
-  for reasons other than specifying the x or y coordinate.
-
 * The `call` command is implemented by providing a set of variables ARGC,
   ARG0, ..., ARG9. ARG0 holds the name of the script file being executed.
   ARG1 to ARG9 are string variables and thus may either be referenced directly
@@ -134,12 +142,6 @@ Demo plots illustrating new and old features are online at
 KNOWN ISSUES
 ============
 
-* There is no documentation for the new "fit" options xerror|xyerror|etc.
-  Running old fit scripts may require adding the new keyword "noerrors"
-  (these new options may change for the final 5.0 release).
-
-* It is tricky to build the wxt and qt terminals under Windows.
-
 * Font initialization on OSX can be very slow, causing the qt terminal to
   issue warning or error messages for the first plot command.
 
@@ -148,8 +150,8 @@ KNOWN ISSUES
   Toggling plots drawn in hidden3d mode (hidden line removal) does not work.
 
 * Linking against wxWidgets 3.0 is not supported (wxt terminal).
-  If you configure wxt without also configure X11, you may need to set the
-  environmental variable TERMLIBS before configuring:
+  If you configure in the wxt terminal without also configuring in X11,
+  you may need to set the environmental variable TERMLIBS:
     TERMLIBS="-lX11"  ./configure
 
 * Mac OSX ships with a terminal input library that appears to be GNU
@@ -193,7 +195,7 @@ in addition to several platform-specific modes.
    The qt terminal supports interactive display with menu-driven
    output to png, svg or pdf.  The final 5.0 release may also support
    scripted output to these same file formats but this is not present
-   in rc2.  If either Qt4 or Qt5 is detected by the configure script,
+   in rc3.  If either Qt4 or Qt5 is detected by the configure script,
    this will be the default terminal.  It is now the fastest and most
    full-featured interactive terminal option.
    To disable this terminal:
@@ -226,7 +228,7 @@ are also still available. These include, among many more obscure options:
 - png/jpeg/gif output via libgd
 - PostScript (*.ps or *.eps)
 - Many flavors of TeX/LaTeX output, including TikZ and ConTeXt
-- Bitmapped output to support many older devices (e.g. HP deskjet, epson,
+- Bitmapped output to support older devices (e.g. HP deskjet, epson, and
   seiko printers, pbm bitmapped graphics files) is available if needed
   but is no longer configured in by default.
       ./configure --with-bitmap-terminals
@@ -245,7 +247,7 @@ Options for generating interactive plots for web display
 Installation
 ------------
 
-You can download a source tarball for gnuplot version 5.0.rc2 from the 
+You can download a source tarball for gnuplot version 5.0.rc3 from the 
 gnuplot development site on SourceForge.
 	http://sourceforge.net/project/showfiles.php?group_id=2055
 
@@ -253,7 +255,7 @@ Installation instructions are available in the source itself; the short
 version for linux/unix-like systems is to unpack the tarball and then
 <PRE>
 build it:
-      cd gnuplot-5.0.rc2 ; ./configure ; make
+      cd gnuplot-5.0.rc3 ; ./configure ; make
 test it:
       make check
 install it:
@@ -279,10 +281,10 @@ There is also an gnuplot discussion forum on usenet group
 Development
 -----------
 Gnuplot development is ongoing. The development branch on SourceForge
-contains preliminary implementations of many new features.  As of 5.0.rc2
-the source for version 5.0 is held in a separate branch of the CVS repository
-branch-5-0-stable.  Development continues in the main branch using the
-version number 5.1 (odd minor number), for eventual release as stable version
-5.2 (even minor number).  Bugfixes to version 5.0 will appear in patchlevel
-releases 5.0.1, 5.0.2, etc., approximately twice a year or as needed to correct
-a serious problem.
+contains preliminary implementations of new features.
+The source for version 5.0 is held in a separate branch of the CVS repository
+tagged as "branch-5-0-stable".  Development continues in the main branch using
+the version number 5.1 (odd minor number), for eventual release as stable
+version 5.2 (even minor number).  Bugfixes to version 5.0 will appear in
+patchlevel releases 5.0.1, 5.0.2, etc., approximately twice a year or
+as needed to correct a serious problem.
diff --git a/config/config.os2 b/config/config.os2
index 4da0822..36e9506 100644
--- a/config/config.os2
+++ b/config/config.os2
@@ -551,3 +551,5 @@
 #define PM_KEEP_OLD_ENHANCED_TEXT 1
 #endif
 
+#define strtoll _strtoll
+
diff --git a/config/makefile.dj2 b/config/makefile.dj2
index f6d5060..a7c6393 100644
--- a/config/makefile.dj2
+++ b/config/makefile.dj2
@@ -1,5 +1,5 @@
 # Hello, emacs: this is a -*- Makefile -*-
-# $Id: makefile.dj2,v 1.22 2014/08/15 19:25:13 sfeam Exp $
+# $Id: makefile.dj2,v 1.22.2.1 2014/10/01 02:40:28 sfeam Exp $
 #
 # GNUPLOT Makefile for DJGPP version 2 on DOS
 #
@@ -10,7 +10,7 @@
 #
 # AUTHORS : several ... including Edzer Pebesma <pebesma at metoor.frw.uva.nl>
 #           last mod. by Hans-Bernhard Broeker <broeker at physik.rwth-aachen.de>
-# DATE of last mod: $Date: 2014/08/15 19:25:13 $
+# DATE of last mod: $Date: 2014/10/01 02:40:28 $
 #
 # 
 # removed atari reference and added binary demo bf_test
@@ -80,7 +80,7 @@ D=../docs/
 M=../demo/
 O=o
 
-CSOURCE5 = $(T)ai.trm $(T)aed.trm \
+CSOURCE5 = $(T)ai.trm \
 	$(T)djsvga.trm $(T)dumb.trm \
 	$(T)dxf.trm $(T)dxy.trm \
 	$(T)debug.trm $(T)eepic.trm $(T)epson.trm $(T)fig.trm  \
@@ -92,7 +92,7 @@ CSOURCE6 = $(T)impcodes.h $(T)imagen.trm $(T)next.trm $(T)object.h \
 	$(T)pbm.trm $(T)pc.trm 
 CSOURCE7 = $(T)post.trm $(T)qms.trm $(T)regis.trm $(T)sun.trm \
 	$(T)t410x.trm $(T)tek.trm $(T)texdraw.trm \
-	$(T)v384.trm $(T)vws.trm $(T)x11.trm $(T)xlib.trm
+	$(T)vws.trm $(T)x11.trm $(T)xlib.trm
 #OBJ1 =  bitmap.o command.o contour.o eval.o graphics.o graph3d.o hidden3d.o util3d.o
 #OBJ2 =  help.o internal.o misc.o parse.o plot.o plot2d.o plot3d.o readline.o
 #OBJ3 =  scanner.o set.o show.o specfun.o standard.o stdfn.o term.o time.o util.o
diff --git a/config/makefile.emx b/config/makefile.emx
index 8d6a810..a974319 100644
--- a/config/makefile.emx
+++ b/config/makefile.emx
@@ -1,5 +1,5 @@
 #
-# $Id: makefile.emx,v 1.10 2013/10/25 03:10:27 sfeam Exp $
+# $Id: makefile.emx,v 1.10.2.1 2014/10/01 02:40:28 sfeam Exp $
 #
 # GNUPLOT Makefile for use with emx-0.8f/gcc and ndmake 4.5 on MS-DOS
 #
@@ -29,14 +29,13 @@ OBJS = 	alloc.o binary.o bitmap.o command.o contour.o datafile.o dynarray.o \
 	standard.o stdfn.o tables.o tabulate.o term.o time.o unset.o util.o util3d.o \
 	variable.o version.o
 
-CSOURCE5 = term\aed.trm term/dumb.trm term/dxf.trm term\dxy.trm \
+CSOURCE5 = term/dumb.trm term/dxf.trm term\dxy.trm \
 	term\eepic.trm term\epson.trm term\fig.trm term\hp26.trm \
 	term\hp2648.trm term\hpgl.trm term\hpljii.trm 
 CSOURCE6 = term\impcodes.h term\imagen.trm term\object.h \
 	term\kyo.trm term\latex.trm term/pbm.trm term\pm.trm 
 CSOURCE7 = term\post.trm term\qms.trm term\regis.trm term\sun.trm \
-	term\t410x.trm term\tek.trm \
-	term\v384.trm term\x11.trm term\emxvga.trm
+	term\t410x.trm term\tek.trm term\x11.trm term\emxvga.trm
 CSOURCE8 = contour.c
 
 all: gnuplotx.exe $(HELPFILE)
diff --git a/config/makefile.vms b/config/makefile.vms
index 2ca9d27..59d1c20 100644
--- a/config/makefile.vms
+++ b/config/makefile.vms
@@ -1,5 +1,5 @@
 #
-# $Id: makefile.vms,v 1.16 2013/10/25 03:10:28 sfeam Exp $
+# $Id: makefile.vms,v 1.16.2.1 2014/10/01 02:40:28 sfeam Exp $
 #
 # GNUPLOT Makefile for VMS
 #
@@ -73,15 +73,15 @@ CSOURCE1 = command.c set.c show.c variable.c
 CSOURCE2 = help.c graphics.c graph3d.c internal.c
 CSOURCE3 = misc.c eval.c parse.c plot.c plot2d.c plot3d.c scanner.c standard.c stdfn.c
 CSOURCE4 = bitmap.c term.c time.c util.c version.c interpol.c fit.c matrix.c stats.c
-CSOURCE5 = [-.term]aed.trm [-.term]dumb.trm [-.term]dxf.trm [-.term]dxy.trm \
+CSOURCE5 = [-.term]dumb.trm [-.term]dxf.trm [-.term]dxy.trm \
 	[-.term]eepic.trm [-.term]epson.trm [-.term]fig.trm [-.term]hp26.trm \
 	[-.term]hp2648.trm [-.term]hpgl.trm [-.term]hpljii.trm
 CSOURCE6 = [-.term]impcodes.h [-.term]imagen.trm [-.term]object.h \
 	[-.term]kyo.trm [-.term]latex.trm [-.term]pbm.trm  \
 	[-.term]pc.trm
-CSOURCE7 = [-.term]post.trm [-.term]qms.trm [-.term]regis.trm [-.term]sun.trm \
+CSOURCE7 = [-.term]post.trm [-.term]qms.trm [-.term]regis.trm \
 	[-.term]t410x.trm [-.term]tek.trm \
-	[-.term]v384.trm [-.term]x11.trm gplt_x11.c
+	[-.term]x11.trm gplt_x11.c
 CSOURCE8 = contour.c specfun.c interpol.c vms.c dynarray.c
 
 all :   gnuplot.$(X) gnuplot_x11.$(X) gnuplot.hlp gnuplot.hlb \
diff --git a/configure b/configure
index 61b617a..41251b4 100755
--- a/configure
+++ b/configure
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for gnuplot 5.0.rc2.
+# Generated by GNU Autoconf 2.69 for gnuplot 5.0.rc3.
 #
 #
 # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
@@ -577,8 +577,8 @@ MAKEFLAGS=
 # Identity of this package.
 PACKAGE_NAME='gnuplot'
 PACKAGE_TARNAME='gnuplot'
-PACKAGE_VERSION='5.0.rc2'
-PACKAGE_STRING='gnuplot 5.0.rc2'
+PACKAGE_VERSION='5.0.rc3'
+PACKAGE_STRING='gnuplot 5.0.rc3'
 PACKAGE_BUGREPORT=''
 PACKAGE_URL=''
 
@@ -804,6 +804,7 @@ enable_silent_rules
 enable_maintainer_mode
 enable_dependency_tracking
 enable_largefile
+with_libcerf
 with_latex
 with_texdir
 with_kpsexpand
@@ -1418,7 +1419,7 @@ if test "$ac_init_help" = "long"; then
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-\`configure' configures gnuplot 5.0.rc2 to adapt to many kinds of systems.
+\`configure' configures gnuplot 5.0.rc3 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1488,7 +1489,7 @@ fi
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of gnuplot 5.0.rc2:";;
+     short | recursive ) echo "Configuration of gnuplot 5.0.rc3:";;
    esac
   cat <<\_ACEOF
 
@@ -1522,6 +1523,7 @@ Optional Features:
 Optional Packages:
   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
+  --without-libcerf      build without special functions from libcerf (default enabled)
   --without-latex         disable latex support, (default enable)
   --with-texdir=DIR       where to install latex style files
                           (default by kpsexpand in subdir PACKAGE)
@@ -1674,7 +1676,7 @@ fi
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-gnuplot configure 5.0.rc2
+gnuplot configure 5.0.rc3
 generated by GNU Autoconf 2.69
 
 Copyright (C) 2012 Free Software Foundation, Inc.
@@ -2298,7 +2300,7 @@ cat >config.log <<_ACEOF
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by gnuplot $as_me 5.0.rc2, which was
+It was created by gnuplot $as_me 5.0.rc3, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   $ $0 $@
@@ -3168,7 +3170,7 @@ fi
 
 # Define the identity of the package.
  PACKAGE='gnuplot'
- VERSION='5.0.rc2'
+ VERSION='5.0.rc3'
 
 
 cat >>confdefs.h <<_ACEOF
@@ -7240,6 +7242,16 @@ fi
 
 
 
+# Check whether --with-libcerf was given.
+if test "${with_libcerf+set}" = set; then :
+  withval=$with_libcerf;
+else
+  test -z "${with_libcerf}" && with_libcerf=yes
+fi
+
+
+if test "${with_libcerf}" = yes ; then
+
 
 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
 	if test -n "$ac_tool_prefix"; then
@@ -7465,11 +7477,11 @@ else
         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
 
-    CPPFLAGS="$CPPFLAGS $LIBCERF_CFLAGS"
-    LDFLAGS="$LDFLAGS $LIBCERF_LIBS"
+      CPPFLAGS="$CPPFLAGS $LIBCERF_CFLAGS"
+      LDFLAGS="$LDFLAGS $LIBCERF_LIBS"
 
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing cdawson" >&5
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing cdawson" >&5
 $as_echo_n "checking for library containing cdawson... " >&6; }
 if ${ac_cv_search_cdawson+:} false; then :
   $as_echo_n "(cached) " >&6
@@ -7525,10 +7537,11 @@ if test "$ac_res" != no; then :
 
 $as_echo "#define HAVE_LIBCERF 1" >>confdefs.h
 
-    have_libcerf=yes
+      have_libcerf=yes
 
 fi
 
+fi
 
 test x"$EMACS" = xt && EMACS=
 for ac_prog in emacs xemacs
@@ -15262,7 +15275,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by gnuplot $as_me 5.0.rc2, which was
+This file was extended by gnuplot $as_me 5.0.rc3, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -15328,7 +15341,7 @@ _ACEOF
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
 ac_cs_version="\\
-gnuplot config.status 5.0.rc2
+gnuplot config.status 5.0.rc3
 configured by $0, generated by GNU Autoconf 2.69,
   with options \\"\$ac_cs_config\\"
 
diff --git a/configure.in b/configure.in
index 912709f..46cdfbc 100755
--- a/configure.in
+++ b/configure.in
@@ -1,12 +1,12 @@
 dnl Process this file with autoconf to produce a configure script.
 dnl configure.in for gnuplot on Unix.
 dnl
-dnl $Id: configure.in,v 1.370.2.1 2014/08/20 18:37:29 sfeam Exp $
+dnl $Id: configure.in,v 1.370.2.2 2014/09/09 03:11:15 sfeam Exp $
 dnl
 dnl this is actually major.minor ...
 dnl note that for a non-beta release, we need to disable DEVELOPMENT_RELEASE
 dnl
-AC_INIT(gnuplot, 5.0.rc2)
+AC_INIT(gnuplot, 5.0.rc3)
 AC_CONFIG_SRCDIR(src/graphics.c)
 AC_PREREQ(2.60)
 AC_CONFIG_HEADERS(config.h:config.hin)
@@ -80,19 +80,25 @@ AC_CHECK_TYPES([off_t])
 AC_FUNC_FSEEKO
 AC_SYS_LARGEFILE
 
-dnl The libcerf library contains a set of complex-valued special functions
-dnl related to the error function (cerf, erfi, Dawson's integral, Voigt profile).
-dnl If libcerf is installed then we can use them.
-PKG_CHECK_MODULES_NOFAIL([LIBCERF], [libcerf],
-    [
-    CPPFLAGS="$CPPFLAGS $LIBCERF_CFLAGS"
-    LDFLAGS="$LDFLAGS $LIBCERF_LIBS"
-    ],
-)
-AC_SEARCH_LIBS([cdawson], [cerf],
-    [AC_DEFINE([HAVE_LIBCERF], 1, [define if you have libcerf])
-    have_libcerf=yes]
-)
+AC_ARG_WITH(libcerf,dnl
+[  --without-libcerf      build without special functions from libcerf (default enabled)],,
+  [test -z "${with_libcerf}" && with_libcerf=yes])
+
+if test "${with_libcerf}" = yes ; then
+  dnl The libcerf library contains a set of complex-valued special functions
+  dnl related to the error function (cerf, erfi, Dawson's integral, Voigt profile).
+  dnl If libcerf is installed then we can use them.
+  PKG_CHECK_MODULES_NOFAIL([LIBCERF], [libcerf],
+      [
+      CPPFLAGS="$CPPFLAGS $LIBCERF_CFLAGS"
+      LDFLAGS="$LDFLAGS $LIBCERF_LIBS"
+      ],
+  )
+  AC_SEARCH_LIBS([cdawson], [cerf],
+      [AC_DEFINE([HAVE_LIBCERF], 1, [define if you have libcerf])
+      have_libcerf=yes]
+  )
+fi
 
 dnl Various programs
 dnl X/Emacs for building .texi version of docs
diff --git a/configure.vms b/configure.vms
index ce998db..9906f2d 100755
--- a/configure.vms
+++ b/configure.vms
@@ -376,8 +376,8 @@ $ IF (.NOT. READLINE) THEN COREOBJS = COREOBJS - "readline " - " readline"
 $ !
 $ ! List of terminal files; all are in [.term] and have an extension of .trm.
 $ !
-$ CORETERM = "aed dumb dxf dxy eepic epson fig hp26 hp2648 hpgl hpljii " -
-           + "imagen kyo latex pbm pc post qms regis sun t410x tek x11"
+$ CORETERM = "dumb dxf dxy eepic epson fig hp26 hp2648 hpgl hpljii " -
+           + "imagen kyo latex pbm pc post qms regis t410x tek x11"
 $ OTHERTERM = "[-.term]impcodes.h [-.term]object.h gplt_x11.c"
 $ !
 $ ! Define CFLAGS. ("NO_GIH" may be omitted to generate and use "gnuplot.gih".)
diff --git a/demo/fit.dem b/demo/fit.dem
index 40f584a..df4d675 100644
--- a/demo/fit.dem
+++ b/demo/fit.dem
@@ -1,5 +1,5 @@
 #
-# $Id: fit.dem,v 1.19 2014/02/28 10:22:49 markisch Exp $
+# $Id: fit.dem,v 1.19.2.1 2014/09/21 04:54:31 sfeam Exp $
 #
 
 myencoding = GPVAL_ENCODING
@@ -113,11 +113,11 @@ r  = 0.5
 set title 'the scattered points, and the initial parameter'
 splot 'hemisphr.dat' using 1:2:3, h(x,y)
 print "  fit function: " . GPFUN_h
-print "  fit command : fit h(x,y) 'hemisphr.dat' using 1:2:3 noerr via r, x0, y0, z0"
+print "  fit command : fit h(x,y) 'hemisphr.dat' using 1:2:3 via r, x0, y0, z0"
 pause -1 "Press enter to start the fit."
 
 set fit results maxiter 50 errorscaling
-fit h(x,y) 'hemisphr.dat' using 1:2:3 noerr via r, x0, y0, z0
+fit h(x,y) 'hemisphr.dat' using 1:2:3 via r, x0, y0, z0
 set title 'the scattered points, fitted curve'
 splot 'hemisphr.dat' using 1:2:3, h(x,y)
 
@@ -133,7 +133,7 @@ print ''
 print "Another possibility is to prescale the variables (set fit prescale),"
 print "which may improve convergence."
 print "  fit settings: set fit maxiter 50 prescale"
-print "  fit command : fit h(x,y) 'hemisphr.dat' using 1:2:3 noerr via r, x0,y0,z0"
+print "  fit command : fit h(x,y) 'hemisphr.dat' using 1:2:3 via r, x0,y0,z0"
 #pause -1 "Press enter to start the fit."
 
 set fit maxiter 50 prescale
@@ -141,7 +141,7 @@ x0 = 0.1
 y0 = 0.2
 z0 = 0.3
 r  = 0.5
-#fit h(x,y) 'hemisphr.dat' using 1:2:3 noerr via r, x0, y0, z0
+#fit h(x,y) 'hemisphr.dat' using 1:2:3 via r, x0, y0, z0
 #replot
 set fit maxiter 0 noprescale brief
 pause -1 "Press enter to proceed with the next example."
@@ -162,11 +162,10 @@ print "  fit function: " . GPFUN_f
 print "                " . GPFUN_vlong
 print "                " . GPFUN_vtrans
 print "y will be the index of the dataset."
-print "  fit command: fit f(x,y) 'soundvel.dat' using 1:-2:2 noerr via 'sound.par'\n"
+print "  fit command: fit f(x,y) 'soundvel.dat' using 1:-2:2 via 'sound.par'\n"
 pause -1 "Press enter to start the fit."
 
-# Must provide 'noerr' for a 3d fit.
-fit f(x,y) 'soundvel.dat' using 1:-2:2 noerr via 'sound.par'
+fit f(x,y) 'soundvel.dat' using 1:-2:2 via 'sound.par'
 #create soundfit.par, reading from sound.par and updating values
 update 'sound.par' 'soundfit.par'
 set title 'pseudo-3d multi-branch fit to velocity data'
@@ -179,12 +178,12 @@ pause -1 "Press enter to proceed with the next example."
 
 print "Next we only use every fifth data point for fitting by using the 'every'"
 print "keyword. Note the faster fit and its result."
-print "  fit command: fit f(x,y) 'soundvel.dat' every 5 using 1:-2:2 noerr via 'sound.par'\n"
+print "  fit command: fit f(x,y) 'soundvel.dat' every 5 using 1:-2:2 via 'sound.par'\n"
 load 'sound.par'
 plot 'soundvel.dat', vlong(x), vtrans(x)
 pause -1 "Press enter to start the fit."
 
-fit f(x,y) 'soundvel.dat' every 5 using 1:-2:2 noerr via 'sound.par'
+fit f(x,y) 'soundvel.dat' every 5 using 1:-2:2 via 'sound.par'
 set title 'fitted only every 5th data point'
 plot 'soundvel.dat', vlong(x), vtrans(x)
 print ''
@@ -201,7 +200,7 @@ set title 'initial parameters'
 plot 'soundvel.dat', vlong(x), vtrans(x)
 pause -1 "Press enter to start the fit."
 
-fit f(x,y) 'soundvel.dat' using 1:-2:2 noerr via 'sound2.par'
+fit f(x,y) 'soundvel.dat' using 1:-2:2 via 'sound2.par'
 set title 'fit with c44 and c13 fixed'
 plot 'soundvel.dat', vlong(x), vtrans(x)
 print ''
@@ -270,13 +269,13 @@ print 'representing x:y:z:s (where s is the estimated error in the z value).'
 a0=1; a1=.1; a2=.1
 f1(x,y)=a0/(1+a1*x**2+a2*y**2)
 print "  fit function: ", GPFUN_f1
-print "  fit command : fit f1(x,y) 'fit3.dat' index 0 using 1:2:4 noerr via a0,a1,a2\n"
+print "  fit command : fit f1(x,y) 'fit3.dat' index 0 using 1:2:4 via a0,a1,a2\n"
 set title "data and initial parameters"
 splot f1(x,y), 'fit3.dat' in 0 u 1:2:4
 pause -1 "Press enter to start the fit."
 
 set fit errorscaling
-fit f1(x,y) 'fit3.dat' index 0 using 1:2:4 noerr via a0,a1,a2
+fit f1(x,y) 'fit3.dat' index 0 using 1:2:4 via a0,a1,a2
 set title "fit to data with t = -3"
 splot f1(x,y), 'fit3.dat' in 0 u 1:2:4
 pause -1 "Press enter to proceed with the next example."
@@ -285,29 +284,27 @@ print ''
 print "Here is the last set of data where t = 3."
 print "We fit the same function to this set."
 print "  fit function: ", GPFUN_f1
-print "  fit command : fit f1(x,y) 'fit3.dat' index 3 using 1:2:4 noerr via a0,a1,a2\n"
+print "  fit command : fit f1(x,y) 'fit3.dat' index 3 using 1:2:4 via a0,a1,a2\n"
 set title "fit to data with t = +3, initial parameters"
 splot f1(x,y), 'fit3.dat' in 3 u 1:2:4
 pause -1 "Press enter to start the fit."
 
-fit f1(x,y) 'fit3.dat' in 3 u 1:2:4 noerr via a0,a1,a2
+fit f1(x,y) 'fit3.dat' in 3 u 1:2:4 via a0,a1,a2
 set title "fit to data with t = +3"
 splot f1(x,y), 'fit3.dat' in 3 u 1:2:4
 pause -1 "Press enter to proceed with the next example."
 
 print ''
 print "We also have data for several intermediate values of t.  We will fit the"
-print "function f(x,y,t)=a0*t/(1+a1*x**2+a2*y**2) to all the data.  Since there are now"
-print "three independent variables, we need a using spec with four entries,"
-print "representing x:y:t:z and the keyword 'noerr'." 
+print "function f(x,y,t)=a0*t/(1+a1*x**2+a2*y**2) to all the data."
 f(x,y,t)=a0*t/(1+a1*x**2+a2*y**2)
 print "  fit function: ", GPFUN_f
-print "  fit command : fit f(x,y,t) 'fit3.dat' u 1:2:3:4 noerr via a0,a1,a2\n"
+print "  fit command : fit f(x,y,t) 'fit3.dat' u 1:2:3:4 via a0,a1,a2\n"
 set title "data for all indices t, initial parameters"
 splot f(x,y,1), 'fit3.dat' u 1:2:4
 pause -1 "Press enter to start the fit."
 
-fit f(x,y,t) 'fit3.dat' u 1:2:3:4 noerr via a0,a1,a2
+fit f(x,y,t) 'fit3.dat' u 1:2:3:4 via a0,a1,a2
 print ''
 print 'Here are all the data together.'
 set title "fit to all data"
@@ -322,7 +319,7 @@ print 'fit.  The first range corresponds to the first "using" entry, etc. For ex
 print 'we could have gotten the same fit like this:'
 print '   fit [lon=*:*][lat=*:*][time=*:*]        \'
 print '     a0*time/(1 + a1*lon**2 + a2*lat**2)   \'
-print '     "fit3.dat" u 1:2:3:4 noerror via a0,a1,a2'
+print '     "fit3.dat" u 1:2:3:4 via a0,a1,a2'
 pause -1 "Press enter to proceed with the next example."
 
 reset
@@ -355,23 +352,38 @@ set xrange [-1:9]
 set fit limit 1.0e-8 start_lambda 1 prescale noerrorscaling errorvariables
 
 # fit function and initial values
+f(x)  = a1 + a2*x
+a1 = 5.
+a2 = -0.5
 fy(x) = a1y + a2y*x
 a1y = 5.
 a2y = -0.5
 
-set title "Pearson's data and York's weights\ndata and the initial function"
+set title "Pearson's data and York's weights\noriginal data and the initial function"
 plot \
   $PearsonYork using 2:4:(sqrt(1./$3)):(sqrt(1./$5)) with xyerrorbars lt -1 title 'data', \
-  fy(x) lw 2 lt 1 title 'initial function'
+  f(x) lw 2 lt 1 title 'initial function'
   
+msg = "Press enter to fit the data using no error values"
+print "\n". msg . "\n"
+pause -1 msg
+
+# do the fit
+fit f(x) $PearsonYork using 2:4 via a1, a2
+
+set title "Pearson's data and York's weights\nfunction fit with no error terms"
+plot \
+  $PearsonYork using 2:4:(sqrt(1./$3)):(sqrt(1./$5)) lt -1 with xyerrorbars title 'data', \
+  f(x) lw 2 lt 1 title 'fit using no error terms'
+
 msg = "Press enter to fit the data using only the uncertainties of the y-values."
 print "\n". msg . "\n"
 pause -1 msg
 
 # do the fit
-fit fy(x) $PearsonYork using 2:4:(sqrt(1./$5)) yerror via a1y, a2y
+fit fy(x) $PearsonYork using 2:4:(sqrt(1./$5)) yerrors via a1y, a2y
 
-set title "Pearson's data and York's weights\ndata and the fitted function"
+set title "Pearson's data and York's weights\nfunction fit with yerror keyword"
 plot \
   $PearsonYork using 2:4:(sqrt(1./$3)):(sqrt(1./$5)) lt -1 with xyerrorbars title 'data', \
   fy(x) lw 2 lt 2 title 'fit using only dy'
@@ -389,11 +401,12 @@ a2xy = -0.5
 #a2xy = -0.481
 
 # do the fit
-fit fxy(x) $PearsonYork using 2:4:(sqrt(1./$3)):(sqrt(1./$5)) xyerr via a1xy, a2xy
+fit fxy(x) $PearsonYork using 2:4:(sqrt(1./$3)):(sqrt(1./$5)) xyerrors via a1xy, a2xy
 
-set title "Pearson's data and York's weights\ndata and the fitted functions"
+set title "Pearson's data and York's weights\nfunction fit with xyerror keyword"
 plot \
   $PearsonYork using 2:4:(sqrt(1./$3)):(sqrt(1./$5)) with xyerrorbars lt -1 title 'data', \
+  f(x) lw 2 lt 1 title 'fit with no errors', \
   fy(x) lw 2 lt 2 title 'fit using only dy', \
   fxy(x) lw 2 lt 3 title 'fit using dx and dy'
 
diff --git a/demo/gantt.dem b/demo/gantt.dem
index 9e76dc6..91ffc67 100644
--- a/demo/gantt.dem
+++ b/demo/gantt.dem
@@ -27,10 +27,11 @@ S     2014-01-31 2014-03-31
 T     2014-03-01 2014-04-28
 EOD
 
+set xdata time
 timeformat = "%Y-%m-%d"
 set format x "%b\n'%y"
+
 set yrange [-1:]
-set xdata time
 OneMonth = strptime("%m","2")
 set xtics OneMonth nomirror
 set xtics scale 2, 0.5
@@ -48,5 +49,11 @@ set style arrow 1 filled size screen 0.02, 15 fixed lt 3 lw 1.5
 plot $DATA using (T(2)) : ($0) : (T(3)-T(2)) : (0.0) : yticlabel(1) with vector as 1, \
      $DATA using (T(2)) : ($0) : 1 with labels right offset -2
 
+pause -1 "Hit return to check backwards compatibility with v4 syntax"
+
+set timefmt timeformat
+plot $DATA using (timecolumn(2)) : ($0) : (T(3)-T(2)) : (0.0) : yticlabel(1) with vector as 1, \
+     $DATA using 2 : ($0) : 1 with labels right offset -2
+
 pause -1 "Hit return to continue"
 reset
diff --git a/demo/plugin/Makefile b/demo/plugin/Makefile
index c66161a..df8d25f 100644
--- a/demo/plugin/Makefile
+++ b/demo/plugin/Makefile
@@ -226,10 +226,10 @@ OBJEXT = o
 PACKAGE = gnuplot
 PACKAGE_BUGREPORT = 
 PACKAGE_NAME = gnuplot
-PACKAGE_STRING = gnuplot 5.0.rc2
+PACKAGE_STRING = gnuplot 5.0.rc3
 PACKAGE_TARNAME = gnuplot
 PACKAGE_URL = 
-PACKAGE_VERSION = 5.0.rc2
+PACKAGE_VERSION = 5.0.rc3
 PANGO_1_10_2_CFLAGS = 
 PANGO_1_10_2_LIBS = 
 PATH_SEPARATOR = :
@@ -250,7 +250,7 @@ TEXHASH = texhash
 TROFF = troff
 TUTORIAL = notutorial
 UIC = /usr/lib64/qt5/bin/uic
-VERSION = 5.0.rc2
+VERSION = 5.0.rc3
 VERSION_MAJOR = 5.0
 WX_CONFIG = /usr/bin/wx-config
 WX_LIBS = -L/usr/lib64  -lwx_gtk2u_richtext-2.8 -lwx_gtk2u_aui-2.8 -lwx_gtk2u_xrc-2.8 -lwx_gtk2u_qa-2.8 -lwx_gtk2u_html-2.8 -lwx_gtk2u_adv-2.8 -lwx_gtk2u_core-2.8 -lwx_baseu_xml-2.8 -lwx_baseu_net-2.8 -lwx_baseu-2.8  -lpangocairo-1.0 -lpango-1.0 -lgobject-2.0 -lglib-2.0 -lcairo  -lgtk-x11-2.0 -lgdk-x11-2.0 -lpangocairo-1.0 -latk-1.0 -lcairo -lgdk_pixbuf-2.0 -lgio-2.0 -Wl,--export-dynamic -lgmodule-2.0 -pthread -lpangoft2-1.0 -lpango-1.0 -lgobject-2.0 -lglib-2.0 -lfontconfig -lfreetype 
diff --git a/demo/stringvar.dem b/demo/stringvar.dem
index 4afb293..c6e7e0c 100644
--- a/demo/stringvar.dem
+++ b/demo/stringvar.dem
@@ -72,6 +72,30 @@ set yrange [0:1]
 plot 0
 
 pause -1 "Hit return to continue"
+set print "stringvar.tmp"
+print "Exercise word and words functions"
+print ""
+foo = "word and words can handle 'quoted string'"
+print "foo = ",foo
+print "words(foo) = ",words(foo)
+print "word(foo, 6) = ",word(foo,6)
+print ""
+foo = "\"double quotes\" or 'single quotes'"
+print "foo = ",foo
+print "words(foo) = ",words(foo)
+print ""
+foo = "Apostrophes inside words don't matter"
+print "foo = ",foo
+print "word(foo, 4) = ",word(foo, 4)
+
+unset print
+set label 1 system("cat stringvar.tmp") at graph 0.1, graph 0.9
+unset xtics
+unset ytics
+set yrange [0:1]
+plot 0
+
+pause -1 "Hit return to continue"
 reset
 #
 set xrange [300:400]
diff --git a/demo/timedat.dem b/demo/timedat.dem
index 4a07234..4c3e5ed 100644
--- a/demo/timedat.dem
+++ b/demo/timedat.dem
@@ -1,5 +1,5 @@
 #
-# $Id: timedat.dem,v 1.11 2014/05/12 04:11:32 sfeam Exp $
+# $Id: timedat.dem,v 1.11.2.1 2014/11/08 04:52:24 sfeam Exp $
 #
 
 set title "Fsteps plot\nwith date and time as x-values"
@@ -43,3 +43,22 @@ e
 pause -1 "Hit return to continue"
 
 reset
+set title "Date format (top) vs Time format (bottom)" font "/:Bold,14"
+set xrange [-7000:3000]
+set link x2
+set tics font ",8"
+set x2tics format "%D\n%R" time offset 0,-1
+set xtics format "%tH:%tM:%tS" time
+set xlabel 'set xtics format "%tH:%tM:%.2tS"' font "/:Bold"
+set arrow 1 from 0, graph 0 to 0, graph 1 heads filled
+
+set yzeroaxis
+unset ytics
+set bmargin at screen .55
+set tmargin at screen .6
+
+plot x notitle
+
+pause -1 "Hit return to continue"
+
+reset
diff --git a/demo/world.dem b/demo/world.dem
index 7abdc43..047dae6 100644
--- a/demo/world.dem
+++ b/demo/world.dem
@@ -1,5 +1,5 @@
 #
-# $Id: world.dem,v 1.10 2011/11/26 00:31:14 sfeam Exp $
+# $Id: world.dem,v 1.10.2.1 2014/11/08 04:52:24 sfeam Exp $
 #
 #
 set title "Gnuplot Correspondences\ngeographic coordinate system"
@@ -7,10 +7,8 @@ unset key
 set xrange [-180:180]
 set yrange [-90:90]
 set yzeroaxis
-set xtics
-set ytics
-set xdata geographic
-set ydata geographic
+set xtics geographic
+set ytics geographic
 set format x "%D %E"
 set format y "%D %N"
 #
diff --git a/docs/Makefile.am b/docs/Makefile.am
index b0b481d..27e3bd1 100644
--- a/docs/Makefile.am
+++ b/docs/Makefile.am
@@ -46,7 +46,7 @@ noinst_PROGRAMS = checkdoc doc2ipf doc2tex doc2gih doc2rnh doc2hlp \
 AM_CPPFLAGS = -I$(top_srcdir)/src -I$(top_srcdir)/term
 
 T = $(top_srcdir)/term/
-CORETERM = $(T)aed.trm $(T)ai.trm $(T)aquaterm.trm $(T)be.trm \
+CORETERM = $(T)ai.trm $(T)aquaterm.trm $(T)be.trm \
 $(T)cairo.trm $(T)canvas.trm $(T)cgm.trm $(T)context.trm \
 $(T)corel.trm $(T)debug.trm $(T)djsvga.trm $(T)dumb.trm $(T)dxf.trm \
 $(T)dxy.trm $(T)eepic.trm $(T)emf.trm $(T)emxvga.trm $(T)epson.trm \
@@ -58,7 +58,7 @@ $(T)metapost.trm $(T)mif.trm $(T)next.trm $(T)openstep.trm $(T)pbm.trm \
 $(T)pdf.trm $(T)pm.trm $(T)post.trm $(T)pslatex.trm \
 $(T)pstricks.trm $(T)qms.trm $(T)qt.trm $(T)regis.trm $(T)sun.trm \
 $(T)svg.trm $(T)t410x.trm $(T)tek.trm $(T)texdraw.trm $(T)tgif.trm \
-$(T)tkcanvas.trm $(T)tpic.trm $(T)v384.trm $(T)vgagl.trm \
+$(T)tkcanvas.trm $(T)tpic.trm $(T)vgagl.trm \
 $(T)vws.trm $(T)win.trm $(T)wxt.trm $(T)x11.trm $(T)xlib.trm 
 
 # DIST_COMMON = README
diff --git a/docs/Makefile.in b/docs/Makefile.in
index 1f694d8..55d594b 100644
--- a/docs/Makefile.in
+++ b/docs/Makefile.in
@@ -410,7 +410,7 @@ gih_DATA = gnuplot.gih
 gihdir = @GIHDIR@
 AM_CPPFLAGS = -I$(top_srcdir)/src -I$(top_srcdir)/term
 T = $(top_srcdir)/term/
-CORETERM = $(T)aed.trm $(T)ai.trm $(T)aquaterm.trm $(T)be.trm \
+CORETERM = $(T)ai.trm $(T)aquaterm.trm $(T)be.trm \
 $(T)cairo.trm $(T)canvas.trm $(T)cgm.trm $(T)context.trm \
 $(T)corel.trm $(T)debug.trm $(T)djsvga.trm $(T)dumb.trm $(T)dxf.trm \
 $(T)dxy.trm $(T)eepic.trm $(T)emf.trm $(T)emxvga.trm $(T)epson.trm \
@@ -422,7 +422,7 @@ $(T)metapost.trm $(T)mif.trm $(T)next.trm $(T)openstep.trm $(T)pbm.trm \
 $(T)pdf.trm $(T)pm.trm $(T)post.trm $(T)pslatex.trm \
 $(T)pstricks.trm $(T)qms.trm $(T)qt.trm $(T)regis.trm $(T)sun.trm \
 $(T)svg.trm $(T)t410x.trm $(T)tek.trm $(T)texdraw.trm $(T)tgif.trm \
-$(T)tkcanvas.trm $(T)tpic.trm $(T)v384.trm $(T)vgagl.trm \
+$(T)tkcanvas.trm $(T)tpic.trm $(T)vgagl.trm \
 $(T)vws.trm $(T)win.trm $(T)wxt.trm $(T)x11.trm $(T)xlib.trm 
 
 
diff --git a/docs/doc2texi.el b/docs/doc2texi.el
index b771b61..4f71dcd 100644
--- a/docs/doc2texi.el
+++ b/docs/doc2texi.el
@@ -254,8 +254,7 @@ Major contributors (alphabetic order):
 
 (defvar d2t-terminal-list ())
 (setq d2t-terminal-list
-      '("aed"
-	"ai"
+      '("ai"
 	"aquaterm"
 	"be"
 	"cairo"
@@ -320,7 +319,6 @@ Major contributors (alphabetic order):
 	"tikz"
 	"tkcanvas"
 	"tpic"
-	"v384"
 	"vgagl"
 	"vws"
 	"win"
diff --git a/docs/faq-ja.tex b/docs/faq-ja.tex
index 10d31e1..d83b500 100644
--- a/docs/faq-ja.tex
+++ b/docs/faq-ja.tex
@@ -1,18 +1,16 @@
 %% Don't forget to change the paper format in the next line
 %
-% $Id: faq-ja.tex,v 1.6 2012/05/16 22:24:12 markisch Exp $
+% $Id: faq-ja.tex,v 1.6.2.1 2014/09/08 17:24:49 sfeam Exp $
 % translated to Japanese by Shigeharu TAKENO
-% Original: Id: faq.tex,v 1.48 2012/03/02 17:50:40 sfeam Exp
+% Original: Id: faq.tex,v 1.53 2014/08/21 15:05:33 sfeam Exp
 %
-% ��: gnuplot-4.6 �ˤϡ�1.48 (2012/03/02) �� FAQ.pdf ��Ʊ������� ?
-% 
 %%% \documentclass[a4paper,11pt]{article}
 \documentclass[a4paper,11pt]{jarticle}
 %% end Japanese
 \usepackage[margin=2cm]{geometry}
 \usepackage[T1]{fontenc}
-%\usepackage[hyphens,T1]{url}
 \usepackage[hyphens]{url}
+\urlstyle{sf}
 
 \ifx\pdfoutput\undefined
     % latex or latex2html output
@@ -43,6 +41,13 @@
     ]{hyperref}
 \fi
 
+\usepackage{color}
+\definecolor{darkblue}{rgb}{0,0,0.5}
+\hypersetup{
+  colorlinks   = true, %Colours links instead of ugly boxes
+  linkcolor    = darkblue, %Colour of internal links
+  urlcolor     = blue %Colour for external hyperlinks
+}
 
 % There may be incompatibilities between different versions of
 % url.sty, html.sty and hyperref.sty -- it seems there are machines which
@@ -50,8 +55,8 @@
 % Thus do it this way:
 \ifx\html\undefined
     % Not running this file by latex2html:
-    \def\http#1{\href{http://#1}{\url{#1}}}
-    \def\mailto#1{\href{mailto://#1}{\url{#1}}}
+    \def\http#1{{\small\href{http://#1}{\url{#1}}}}
+    \def\mailto#1{{\small\href{mailto://#1}{\url{#1}}}}
     \def\news#1{\href{news://#1}{\url{#1}}}
 %%%  \def\ftp#1#2{\href{ftp://#1#2}{\url{#1} in \url{#2}}}
     \def\ftp#1#2{\href{ftp://#1#2}{\url{#1} �� \url{#2}}}
@@ -61,24 +66,24 @@
     \usepackage{html}
 %    \html{
         \newcommand{\news}[1]%
-            {\def~{\~{}}\htmladdnormallink{\latex{\url{#1}}\html{\texttt{#1}}}%
+            {\def~{\~{}}\htmladdnormallink{\latex{\url{#1}}\html{\textit{#1}}}%
                 {news:#1}%
             }
         \newcommand{\ftp}[2]%
 %%%          {\htmladdnormallink{\latex{\url{#1}{} in \url{#2}}%
-%%%                  \html{\texttt{#1} in \texttt{#2}}}%
+%%%                  \html{\textit{#1} in \textit{#2}}}%
             {\htmladdnormallink{\latex{\url{#1}{} �� \url{#2}}%
-                    \html{\texttt{#1} �� \texttt{#2}}}%
+                    \html{\textit{#1} �� \textit{#2}}}%
 %% end Japanese
                 {ftp://#1#2}%
             }
         \newcommand{\mailto}[1]%
-            {\htmladdnormallink{\latex{\url{<#1>}}\html{\texttt{#1}}}%
+            {\htmladdnormallink{\latex{\url{<#1>}}\html{\textit{#1}}}%
                 {mailto:#1}%
             }
         \newcommand{\http}[1]%
             {\htmladdnormallink{\latex{\url{http://#1}}%
-                    \html{\texttt{http://#1}}}%
+                    \html{\textit{http://#1}}}%
                 {http://#1}%
             }
 %   }
@@ -109,24 +114,20 @@
 \date{}
 \maketitle
 
-% This document deals with \gnuplot{} version 4.4 which is the
-% latest official release as of \today. References to bug-fix
-% versions or (recent) beta versions are explicitly marked.
-
 \noindent
-%%% This document deals with \gnuplot{} version 4.6 which is the
-%%% latest official release as of March 2012.
-����ʸ��Ǥϡ�2012 ǯ 3 ��˥�꡼�����줿 \gnuplot{} �������ǿ��ǤǤ��� %
-version 4.6 ���갷�äƤ��ޤ���
+%%% This document refers both to \gnuplot{} version 4 (latest release 4.6.5)
+%%% and version 5 (planned release Fall 2014).
+����ʸ��ϡ�\gnuplot{} �С������ 4 (�ǽ���꡼���� 4.6.5) ��
+�С������ 5 (2014 ���˥�꡼��ͽ��) ��ξ�����оݤȤ��Ƥ��ޤ���
 %% end Japanese
         \\
-%%% Its version is
-%%% \verb+Revision: 1.48 +, dated
-%%% \verb+Date: 2012/03/02 17:50:40 +.
+%%% FAQ version
+%%% \verb+Revision: 1.53 +, dated
+%%% \verb+Date: 2014/08/21 15:05:33 +.
 % <== ������ \verb++ ����¦�� $ ���Ĥ��Ƥ���
-����ʸ��ΥС������� %
-\verb+$+\verb+Revision: 1.48 $+,
-\verb+$+\verb+Date: 2012/03/02 17:50:40 $+ �Ǥ���
+���� FAQ �ΥС������� %
+\verb+$+\verb+Revision: 1.53 $+,
+\verb+$+\verb+Date: 2014/08/21 15:05:33 $+ �Ǥ���
 % �����ٹ��򤷤ʤ��� RCS �˽񤭴������Ƥ��ޤ���
 
 \tableofcontents
@@ -256,7 +257,7 @@ Dave Kotz, John Campbell, Gershon Elber, Alexander Woo
 %%% \item Plotting three-dimensional data points and surfaces in
 %%% many different styles (contour plot, mesh)
 %%% \item Algebraic computation in integer, float and complex arithmetic
-%%% \item User-defined functions and hot-keys
+%%% \item Data-driven model fitting using Marquardt-Levenberg minimization
 %%% \item Support for a large number of operating systems, graphics
 %%% file formats and output devices
 %%% \item Extensive on-line help
@@ -267,7 +268,7 @@ Dave Kotz, John Campbell, Gershon Elber, Alexander Woo
 \item 3 �����ǤΥǡ�������̤Τ�������Υ������� (���������衢�֤���) %
 �ˤ������
 \item �����¿�ʣ�ǿ�Ǥ����黻
-\item �ؿ�������ۥåȥ����������ǽ
+\item Marquardt-Levenberg ��Ŭˡ���Ѥ����ǡ�����ư���ζ�����
 \item ¿���Υ��ڥ졼�ƥ��󥰥����ƥࡢ¿���Υ���ե��å��ե�����������ϡ�
 ������¿���ν������֤Υ��ݡ���
 \item ���ϰϤˤ錄�륪��饤��إ��
@@ -313,30 +314,24 @@ MS-DOS, BeOS, Macintosh 
 �С������ 4.0 �ʹߤǤϸŤ��ץ�åȥۡ���Ǥ�
 Ű��Ū�ʥƥ��ȤϹԤ��Ƥ��ޤ���
 
-%%% Please notify the FAQ-maintainer of any further ports you
-%%% might be aware of.
-¾�Υץ�åȥۡ���Ǥ�ư�����Ȥ��ΤäƤ����顢
-FAQ �Υ��ƥʤ˶����Ƥ���������
-
 %%% You should be able to compile the \gnuplot{} source more or
-%%% less out of the box on any reasonable standard (ANSI/ISO C, POSIX)
+%%% less out of the box in any reasonably standard (ANSI/ISO C, POSIX)
 %%% environment.
-\gnuplot{} �Υ������ϡ�ɸ��Ū (ANSI/ISO C, POSIX ��) �ʴĶ�����
+\gnuplot{} �Υ������ϡ�����ʤ��ɸ��Ū (ANSI/ISO C, POSIX ��) �ʴĶ�����
 ¿�����줿��Τξ�Ǥ⥳��ѥ���Ǥ���Ǥ��礦��
 
 %%% \subsection{Legalities}
 \subsection{�饤���󥹤ˤĤ���}
 
-%%% \Gnuplot{} is freeware authored by a collection of volunteers, who cannot
+%%% \Gnuplot{} is authored by a collection of volunteers, who cannot
 %%% make any legal statement about the compliance or non-compliance of
-%%% \gnuplot{} or its uses. There is also no warranty whatsoever. Use at your
+%%% \gnuplot{} or its uses. There is no warranty whatsoever. Use at your
 %%% own risk.
-\gnuplot{} �ϥܥ��ƥ����ν��Ĥˤ�äƺ��줿�ե꡼�������Ǥ���
+%%% Citing from the README of a mathematical subroutine package by R. Freund:
+\gnuplot{} �ϥܥ��ƥ����ν��Ĥˤ�äƺ��줿��ΤǤ���
 ���� \gnuplot������Ӥ��λ��Ѥε��ġ�
 �Ե��Ĥ˴ؤ���ˡŪ��ʸ�������Ǥ��ޤ��󡣤ޤ������ݾڤ⤢��ޤ���
 ��ʬ���Ȥ���Ǥ�ǻ��Ѥ��Ƥ���������
-
-%%% Citing from the README of a mathematical subroutine package by R. Freund:
 �ʲ��ϡ�R. Freund �ˤ���شؿ�Υ��֥롼����ѥå������� README %
 ����ΰ��ѤǤ�:
 
@@ -359,23 +354,26 @@ FAQ 
 %%% project?}
 \subsection{\gnuplot{} �� FSF �� GNU �ץ������ȤȲ����ط�������ΤǤ���}
 
-%%% \Gnuplot{} is neither written nor maintained by the FSF\@. It is not
-%%% covered by the General Public License, either. It used to be distributed
-%%% by the FSF, however, due to licensing issues it is no longer.
+%%% \Gnuplot{} is neither written nor maintained by the FSF\@. At one 
+%%% time it
+%%% was distributed by the FSF but this is no longer true. \Gnuplot{} 
+%%% as a whole
+%%% is not covered by the GNU General Public License (GPL).
 \gnuplot{} �� FSF ����ä��ΤǤ� FSF �����ƥʥ󥹤��Ƥ���ΤǤ⤢��ޤ���
-������ GNU GPL (General Public License) ���ݸ��Ƥ⤤�ޤ���
-���Ǥ� FSF �������ۤ���Ƥ⤤�ޤ�����
-��������������Ǹ��Τ���ǤϤ���ޤ���
+����� FSF �������ۤ���Ƥ������Ȥ⤢��ޤ�����
+���������ߤϤ��������������ޤ���
+\gnuplot{} �ϡ�GNU General Public License (GPL) �������ݸ��Ƥ��ޤ���
 
 %%% \Gnuplot{} is freeware in the sense that you don't have to pay
 %%% for it. However it is not freeware in the sense that you would be
 %%% allowed to distribute a modified version of your \gnuplot{} freely.
-%%% Please read and accept the \texttt{Copyright} file in your distribution.
+%%% Please read and accept the modification and redistribution terms in
+%%% the \textit{Copyright} file.
 \gnuplot{} �ϡ�̵���Ǥ���ȸ�����̣�ǥե꡼�������Ǥ���
 �����������ʤ������Ѥ�����Τ�ͳ�����ۤ��뤳�Ȥ�ǧ����뤫��
 �Ȥ������Ȥ˴ؤ��Ƥϥե꡼�������ǤϤ���ޤ���
-����ʪ�˴ޤޤ�� \texttt{Copyright} �Ȥ����ե�������ɤ��
-�����ǧ���Ƥ���������
+\textit{Copyright} �Ȥ����ե������ modification (����) ��
+redistribution (������) �ι��ܤ��ɤ�Ǥ����ǧ���Ƥ���������
 
 
 %%% \subsection{Where do I get further information?}
@@ -400,14 +398,15 @@ gnuplot Web 
 %%% \subsection{What is the current version of \gnuplot?}
 \subsection{\gnuplot{} �κǿ��С������� ?}
 
-%%% The current released version of \gnuplot{} is 4.6.
-%%% The current patchlevel is 4.6.0 (March 2012).
-\gnuplot{} �κǿ���������꡼���Ǥ� 4.6 �Ǥ���
-�ǿ��Υѥå���٥�� 4.6.0 �Ǥ� (2012 ǯ 3 ���)��
-
-% The current development series consists of a series of snapshots
-% with version labels 4.5-<date>
-
+%%% The current released version of \gnuplot{} is 4.6, released in 
+%%% March 2012.
+%%% Incremental versions (patchlevel 1, 2, ...) are typically released 
+%%% every six months.
+%%% The development version of \gnuplot{} is currently 5.0.
+\gnuplot{} �κǿ���������꡼���Ǥϡ�2012 ǯ 3 ���꡼���� 4.6 �Ǥ���
+�����С������ (�ѥå���٥� 1, 2, ...) �ϡ��������� 6 �������
+��꡼������ޤ���
+\gnuplot{} �γ�ȯ�Ǥϡ����ߤ� 5.0 �ȤʤäƤ��ޤ���
 
 %%% \subsection{Where can I get \gnuplot?}
 \subsection{\gnuplot{} �Ϥɤ��Ǽ��������ޤ���}
@@ -430,10 +429,10 @@ gnuplot Web 
 
 %%%% % Older versions of the \gnuplot{} distribution is mirrored
 %%%% % at the Comprehensive TeX Archive Network (CTAN) in the
-%%%% % \texttt{graphics/gnuplot} directory. See
+%%%% % \textit{graphics/gnuplot} directory. See
 % �Ť��Ǥ� \gnuplot{} ������ʪ�� CTAN 
 % (the Comprehensive TeX Archive Network) �� \\
-% \texttt{graphics/gnuplot} %
+% \textit{graphics/gnuplot} %
 % �ǥ��쥯�ȥ�ǥߥ顼��󥰤���Ƥ��ޤ���
 % �ʲ��򻲾Ȥ��Ƥ���������
 % %% end Japanese
@@ -460,28 +459,32 @@ gnuplot 
 �㤨�С��ʲ��Τ褦�ʥ��ޥ����ˤ�ä�
 �ǿ��Υ������򤹤٤ƥ�������ɤ��뤳�Ȥ�Ǥ��ޤ���
 %% end Japanese
+\small
 \begin{verbatim}
   cvs -d:pserver:anonymous at gnuplot.cvs.sourceforge.net:/cvsroot/gnuplot login
   cvs -z3 -d:pserver:anonymous at gnuplot.cvs.sourceforge.net:/cvsroot/gnuplot co -P gnuplot
 \end{verbatim}
+\normalsize
 %%% or (in bash)
 �ޤ��� (bash �Ǥ�)
 %% end Japanese
+\small
 \begin{verbatim}
   export CVSROOT=:pserver:anonymous at gnuplot.cvs.sourceforge.net:/cvsroot/gnuplot
   cvs login
   cvs -z3 checkout gnuplot
 \end{verbatim}
+\normalsize
 
 %%% Hit \verb+<return>+ when asked for a password.
 �ѥ���ɤ�ʹ���줿�� \verb+<return>+ ���Ǥ��ޤ���
 
-%%% Further, before the \texttt{./configure} command of gnuplot 
+%%% Further, before the \textit{./configure} command of gnuplot 
 %%% compilation phase,
-%%% you have to execute \texttt{./prepare} to create the up-to-date 
+%%% you have to execute \textit{./prepare} to create the up-to-date 
 %%% configure files.
-���θ塢gnuplot �Υ���ѥ�����ʳ��� \texttt{./configure} �����ˡ�
-\texttt{./prepare} ��¹Ԥ���
+���θ塢gnuplot �Υ���ѥ�����ʳ��� \textit{./configure} �����ˡ�
+\textit{./prepare} ��¹Ԥ���
 �ǿ��� configure �ѤΥե�������������ɬ�פ�����ޤ���
 
 %%% There are no official preliminary binary releases of gnuplot: you have to
@@ -502,65 +505,67 @@ gnuplot 
 %%% \subsection{How do I get \gnuplot{} to compile on my system?}
 \subsection{\gnuplot{} �ϻ�Υ����ƥ�ǤϤɤ�����ѥ��뤹����ɤ��Ǥ���}
 
-%%% As you would any other installation. Read the files \texttt{README.1ST},
-%%% \texttt{README}, and \texttt{INSTALL}.
-¾�Υ��եȤΥ��󥹥ȡ����Ʊ�ͤǤ���\texttt{README.1ST}, \texttt{README}, 
-\texttt{INSTALL} �ե�������ɤ�Ǥ���������
+%%% As you would any other installation. Read the files \textit{README.1ST},
+%%% \textit{README}, and \textit{INSTALL}.
+¾�Υ��եȤΥ��󥹥ȡ����Ʊ�ͤǤ���\textit{README.1ST}, \textit{README}, 
+\textit{INSTALL} �ե�������ɤ�Ǥ���������
 
 \begin{itemize}
 \item
-%%% For Unix, use \texttt{./configure} (or \texttt{./configure 
+%%% For Unix, use \textit{./configure} (or \textit{./configure 
 %%% {-}{-}prefix=\$HOME/usr}
-%%% for an installation for a single user), \texttt{make} and finally
-%%% \texttt{make install} or \texttt{make install-strip}, the latter for smaller
+%%% for an installation for a single user), \textit{make} and finally
+%%% \textit{make install} or \textit{make install-strip}, the latter for smaller
 %%% executables without debugging information. If you want to make a RPM package,
-%%% then replace the latest step by \texttt{checkinstall} or \texttt{checkinstall
-%%% make install-strip}, supposing the package \texttt{checkinstall} on your
+%%% then replace the latest step by \textit{checkinstall} or \textit{checkinstall
+%%% make install-strip}, supposing the package \textit{checkinstall} on your
 %%% machine.
-Unix �Ǥϡ�\texttt{./configure} 
+Unix �Ǥϡ�\textit{./configure} 
 (ñ��桼���Υ��󥹥ȡ���ʤ�� \\
-\texttt{./configure {-}{-}prefix=\$HOME/usr}) %
-��Ȥ���\texttt{make} ��¹Ԥ���
-�Ǹ�� \texttt{make install} �ޤ��� \texttt{make install-strip} �Ȥ��ޤ���
+\textit{./configure {-}{-}prefix=\$HOME/usr}) %
+��Ȥ���\textit{make} ��¹Ԥ���
+�Ǹ�� \textit{make install} �ޤ��� \textit{make install-strip} �Ȥ��ޤ���
 ��ԤϥǥХå���������������꾮���ʼ¹ԥե�����򥤥󥹥ȡ��뤷�ޤ���
 RPM �ѥå��������ꤿ���ʤ顢�Ǹ�Υ��ƥåפ� %
-\texttt{checkinstall} ���ޤ��� \texttt{checkinstall make install-strip} % 
+\textit{checkinstall} ���ޤ��� \textit{checkinstall make install-strip} % 
 ���֤������ޤ�����
-���ʤ��Υޥ���� \texttt{checkinstall} �ѥå�������
+���ʤ��Υޥ���� \textit{checkinstall} �ѥå�������
 ���ݡ��Ȥ��Ƥ���ɬ�פ�����ޤ���
 %% end Japanese
 \item
-%%% On Windows, makefiles can be found in \texttt{config/mingw}, 
-%%% \texttt{config/msvc},
-%%% \texttt{config/watcom}, and \texttt{config/cygwin}. Update the options 
+%%% On Windows, makefiles can be found in \textit{config/mingw}, 
+%%% \textit{config/msvc},
+%%% \textit{config/watcom}, and \textit{config/cygwin}. Update the options 
 %%% in the 
-%%% makefile's header and run the appropriate \texttt{make} tool in the same 
+%%% makefile's header and run the appropriate \textit{make} tool in the same 
 %%% directory
 %%% as the makefile. Additional instructions can be found in the makefiles.
-Windows �Ǥϡ�makefile �� \texttt{config/mingw}, \texttt{config/msvc},
-\texttt{config/watcom}, \texttt{config/cygwin} ��ˤ���ޤ���
+Windows �Ǥϡ�makefile �� \textit{config/mingw}, \textit{config/msvc},
+\textit{config/watcom}, \textit{config/cygwin} ��ˤ���ޤ���
 makefile ����Ƭ�˽񤫤�Ƥ��륪�ץ�����������
 ���� makefile ���֤���Ƥ���Τ�Ʊ���ǥ��쥯�ȥ����
-Ŭ���� \texttt{make} �ġ����¹Ԥ��Ƥ���������
+Ŭ���� \textit{make} �ġ����¹Ԥ��Ƥ���������
 �ɲ������⡢makefile �˽񤫤�Ƥ��ޤ���
 %% end Japanese
 \item
 %%% For DOS, if you are using bash and DJGPP, you can just run 
-%%% \texttt{djconfig.sh}.
-DOS �Ǥϡ�bash �� DJGPP ��ȤäƤ���ʤ� \texttt{djconfig.sh} %
+%%% \textit{djconfig.sh}.
+DOS �Ǥϡ�bash �� DJGPP ��ȤäƤ���ʤ� \textit{djconfig.sh} %
 ��¹Ԥ�������Ǥ���
 %% end Japanese
 \item
 %%% For other platforms, copy the relevant makefile (e.g. 
-%%% \texttt{makefile.os2} for 
-%%% OS/2) from \texttt{config/} to \texttt{src/}, optionally update options 
+%%% \textit{makefile.os2} for 
+%%% OS/2) from \textit{config/} to \textit{src/}, optionally update options 
 %%% in the 
-%%% makefile's header, then change directory to \texttt{src} and run 
-%%% \texttt{make}.
+%%% makefile's header, then change directory to \textit{src} and run 
+%%% \textit{make}.
 ¾�Υץ�åȥե�����Ǥϡ�Ŭ�ڤ� makefile 
-(�㤨�� OS/2 �ʤ� \texttt{makefile.os2}) %
-�� \texttt{config/} �ǥ��쥯�ȥ꤫�� \texttt{src/} �˥��ԡ����ơ�
-\texttt{make} ��¹Ԥ��Ƥ���������
+(�㤨�� OS/2 �ʤ� \textit{makefile.os2}) %
+�� \textit{config/} �ǥ��쥯�ȥ꤫�� \textit{src/} �˥��ԡ����ơ�
+makefile �Υإå��ˤ��륪�ץ�����ɬ�פʤ鹹�����ơ�
+\textit{src} �˥ǥ��쥯�ȥ���ư���ơ�
+\textit{make} ��¹Ԥ��Ƥ���������
 %% end Japanese
 \end{itemize}
 
@@ -568,41 +573,22 @@ DOS 
 %%% \subsection{What documentation is there, and how do I get it?}
 \subsection{�ɥ�����ȤϤɤ��Ǥ����������Ƥ����ɤ����������ޤ���}
 
-%%% The documentation is included in the source distribution. Look
-%%% at the docs subdirectory, where you'll find files to produce
-�ɥ�����Ȥϥ���������ʪ�˴ޤޤ�Ƥ��ޤ������֥ǥ��쥯�ȥ� docs %
-�򸫤Ƥ��������������ˤϰʲ��Τ�Τ���������ե����뤬����ޤ���
-
-\begin{itemize}
-%%% \item a PDF version of the user manual
-%%% \item a Unix man page, which says how to start \gnuplot{}
-%%% \item a tutorial on using \gnuplot{} with \LaTeX{}
-%%% \item a quick reference summary sheet for \TeX{} only
-\item PDF �ǤΥ桼���ޥ˥奢��
-\item Unix man �ڡ��� (\gnuplot{} ��ɤ�ư�������񤤤Ƥ���)
-\item \gnuplot{} �λȤ������塼�ȥꥢ�� (\LaTeX{} �ǵ���)
-\item \gnuplot{} �λȤ������ḫɽ (�����å���ե����; \TeX{} �ǵ���)
-%% end Japanese
-\end{itemize}
-
-%%% The documentation is built during installation if you have \LaTeX{}
-%%% installed on your system, look in the
-%%% directories \texttt{docs} and \texttt{tutorial}.
-�⤷���ʤ��Υ����ƥ�� \LaTeX{} �����󥹥ȡ��뤵��Ƥ���С�
-�ɥ�����Ȥϥ��󥹥ȡ�����˼�ưŪ����������ޤ���
-\texttt{docs} �� \texttt{tutorial} �ǥ��쥯�ȥ����򸫤Ƥ���������
-%% end Japanese
-%%% \texttt{make pdf} in the docs subdirectory
-%%% will make a \texttt{gnuplot.pdf} hypertext file ready for browsing 
-%%% or printing.
-���֥ǥ��쥯�ȥ� docs ����� \texttt{make pdf} �Ȥ��뤳�Ȥǡ�
-����/�������뤿��Υϥ��ѡ��ƥ����ȥե����� \texttt{gnuplot.pdf} %
-���Ѱդ���ޤ���
-
-%%% Online gnuplot documentation is available at
+%%% Full documentation is included in the source distribution.
+%%% Individual sections can be browsed from inside a gnuplot session
+%%% by typing \textit{help {\em keyword}}.
+%%% Look in the docs and tutorial subdirectories, where you'll find 
+%%% files to produce
+%%% PDF or HTML versions of the User Manual.
+�ɥ�����ȤϤ��٤ƥ���������ʪ�˴ޤޤ�Ƥ��ޤ���
+�ġ��Υ��������ϡ�gnuplot �κ����� \textit{help {\em �������}} ��
+�ǤĤ��ȤǸ��뤳�Ȥ��Ǥ��ޤ���
+���֥ǥ��쥯�ȥ� docs �� tutorial ����򸫤Ƥ���������
+�����ˤϡ�PDF �� HTML �ǤΥ桼���ޥ˥奢�����������ե����뤬����ޤ���
+
+%%% Online copies are available at
 %%% \http{gnuplot.sourceforge.net/documentation.html}.
 \http{gnuplot.sourceforge.net/documentation.html} �ˡ�
-gnuplot �Υ���饤��ɥ�����Ȥ�����ޤ���
+���Υ��ԡ����֤��Ƥ���ޤ���
 
 %%% \subsection{Worked examples}
 \subsection{ư��륵��ץ�}
@@ -631,19 +617,19 @@ gnuplot 
 �ե�������֤������ξ�硢�����Ѥ� README �ե����롢
 �ޤ��Ϥ��Υե�����κǽ�ιԤ˲������󤬤��뤫���Τ�ޤ���
 
-%%% To patch a file, you need the \texttt{patch} utility, and possibly
-%%% also the \texttt{automake} and \texttt{autoconf} tools.
+%%% To patch a file, you need the \textit{patch} utility, and possibly
+%%% also the \textit{automake} and \textit{autoconf} tools.
 %%% A typical command for applying a patch is 
 %%% \verb+patch -p0 <newfunctionality.diff+.
-�ѥå������Ƥ���ϡ�\texttt{patch} �桼�ƥ���ƥ���ɬ�פǡ�
-�⤷�������� \texttt{automake}, \texttt{autoconf} �Ȥ����ġ����
-ɬ�פ��⤷��ޤ��󡣥ѥå���Ŭ�Ѥ������ŵ��Ū�ʤ������ %
+�ѥå������Ƥ���ϡ�\textit{patch} �桼�ƥ���ƥ���ɬ�פǡ�
+�⤷�������� \textit{automake}, \textit{autoconf} �Ȥ����ġ����
+ɬ�פ��⤷��ޤ��󡣥ѥå���Ŭ�Ѥ������ŵ��Ū�ʤ������ \\
 \verb+patch -p0 <newfunctionality.diff+ �Ǥ���
 
 %%% There is repository of contributed patches in the "Patches" section 
 %%% on gnuplot's
 %%% sourceforge site \http{sourceforge.net/tracker/?group_id=2055&atid=302055}.
-��Ƥ��줿�ѥå����֤����� gnuplot �� sourceforge ������ %
+��Ƥ��줿�ѥå����֤����� gnuplot �� sourceforge ������ 
 \http{sourceforge.net/tracker/?group_id=2055&atid=302055} %
 �� "Patches" ���������ˤ���ޤ���
 
@@ -658,9 +644,11 @@ gnuplot 
 ���줬����ѥ��뤵�줿�Ȥ��˻��Ѥ��줿����ѥ��륪�ץ���� %
 (��̾����ѥ��쥤����󥪥ץ���󡢥ӥ�ɥ��ץ����) �ΰ�����ɽ���Ǥ��ޤ���
 
+\small
 \begin{verbatim}
 gnuplot> show version long
 \end{verbatim}
+\normalsize
 
 
 %%% \section{Working with it.}
@@ -738,11 +726,12 @@ demo 
 ����դ� PostScript �����ǽ��Ϥ��ޤ���
 ���Ϥ� \verb+set output+ ���ޥ�ɤǥ�����쥯�ȤǤ��ޤ���
 
-%%% As an example, the following prints out a graph of sin(x) on a
-%%% Unix machine running the X-Window System.
-������� X-Windows System ��ư���Ƥ��� Unix �ޥ����� %
-sin(x) �Υ���դ�ץ��ȥ����Ȥ��ޤ���
+%%% As an example, the following first plots a graph of sin(x) to the
+%%% screen and then redraws that same plot as a PostScript output file.
+�ʲ�����ϡ��ޤ� sin(x) �Υ���դ򥹥��꡼�������褷��
+Ʊ������դ� PostScript ���ϥե�����Ȥ��ƺ����褷�ޤ���
 
+%%% \small
 %%% \begin{verbatim}
 %%% gnuplot> plot [-6:6] sin(x)
 %%% gnuplot> set terminal postscript
@@ -750,14 +739,13 @@ sin(x) 
 %%% Options are 'landscape monochrome "Courier" 14'
 %%% gnuplot> set output "sin.ps"
 %%% gnuplot> replot
-%%% gnuplot> set output              # set output back to default
-%%% gnuplot> set terminal x11        # ditto for terminal type
-%%% gnuplot> ! lp -ops sin.ps        # print PS File (site dependent)
-%%% request id is lprint-3433 (standard input)
-%%% lp: printed file sin.ps on fg20.rz.uni-karlsruhe.de (5068 Byte)
-%%% !
+%%% gnuplot> unset output            # set output back to default
+%%% gnuplot> unset terminal          # ditto for terminal type
+%%% gnuplot> system("print sin.ps")  # print PS File (site dependent)
 %%% gnuplot>
 %%% \end{verbatim}
+%%% \normalsize
+\small
 \begin{verbatim}
 gnuplot> plot [-6:6] sin(x)
 gnuplot> set terminal postscript
@@ -765,44 +753,52 @@ Terminal type set to 'postscript'
 Options are 'landscape monochrome "Courier" 14'
 gnuplot> set output "sin.ps"
 gnuplot> replot
-gnuplot> set output              # �������ǥե���Ȥ��᤹
-gnuplot> set terminal x11        # ���Ϸ�����ǥե���Ȥ��᤹
-gnuplot> ! lp -ops sin.ps        # PS �ե������ץ��ȥ����� (�Ķ���¸)
-request id is lprint-3433 (standard input)
-lp: printed file sin.ps on fg20.rz.uni-karlsruhe.de (5068 Byte)
-!
+gnuplot> unset output            # �������ǥե���Ȥ��᤹
+gnuplot> unset terminal          # ���Ϸ�����ǥե���Ȥ��᤹
+gnuplot> system("print sin.ps")  # PS �ե������ץ��ȥ����� (�Ķ���¸)
 gnuplot>
 \end{verbatim}
+\normalsize
 
-%%% Using the platform-independent way of restoring terminal by \texttt{set term
+%%% Using the platform-independent way of restoring terminal by \textit{set term
 %%% push/pop} commands, do it by
 �ץ�åȥե�����˰�¸���ʤ����Ϸ����������ϡ�
-���ޥ�� \texttt{set term push/pop} �ˤ�äưʲ��Τ褦�˹Ԥʤ��ޤ���
+���ޥ�� \textit{set term push/pop} �ˤ�äưʲ��Τ褦�˹Ԥʤ��ޤ���
 %% end Japanese
+\small
 \begin{verbatim}
 gnuplot> set terminal postscript eps color lw 15 "Helvetica" 20
 gnuplot> set out 'a.eps'
 gnuplot> replot
 gnuplot> set term pop
 \end{verbatim}
-%%% The command \texttt{set term pop} without a previous 
-%%% corresponding \texttt{set
-%%% term push} switches the terminal back to the startup terminal, 
-%%% e.g. x11, pm or
-%%% win.
-\texttt{set term pop} ���ޥ�ɤϡ�
-���������б����� \texttt{set term push} ��¹Ԥ��Ƥ��ʤ����ϡ�
-��ư���ν��Ϸ������㤨�� x11, pm, win �����������ޤ���
-
-%%% Using the \texttt{windows} terminal, you can print your graph by clicking 
-%%% on the
-%%% printer icon on the terminals toolbar, or by issuing \texttt{screendump} 
-%%% on the
-%%% command line.
-\texttt{windows} ���Ϸ����Ǥϡ����Υġ���С��ξ�Υץ�󥿥��������
-����å����롢���뤤�ϥ��ޥ�ɥ饤��� \texttt{screendump} ��¹Ԥ��뤳�Ȥ�
-����դ�ץ��ȥ����ȤǤ��ޤ���
-
+\normalsize
+%%% The command \textit{set term pop} without a previous 
+%%% corresponding \textit{set
+%%% term push} switches the terminal back to the startup terminal.
+%%% The same thing happens if you say \textit{unset terminal}.
+\textit{set term pop} ���ޥ�ɤϡ�
+���������б����� \textit{set term push} ��¹Ԥ��Ƥ��ʤ����ϡ�
+��ư���ν��Ϸ����������ޤ���
+\textit{unset terminal} ��¹Ԥ�������Ʊ���Ǥ���
+
+%%% Some interactive terminal types (\textit{win, wxt, qt}) 
+%%% provide a printer icon
+%%% on the terminal's toolbar. This tool prints the current plot
+%%% or saves it to file
+%%% using generic system tools rather than by using a different 
+%%% gnuplot terminal type.
+%%% That is, the file you get by selecting "save to png" 
+%%% in the print menu will be
+%%% different than the file you get from \textit{set term png; replot;}.
+���÷����Ϸ�������ˤϤ��Υġ���С���˥ץ�󥿥���������󶡤���
+��Τ⤢��ޤ� (\textit{win, wxt, qt} ��)��
+����ϡ�¾�ν��Ϸ�������Ѥ���ΤǤϤʤ���
+�����ƥ���Ѱդ���Ƥ������Ū�ʥ����ƥ�ġ����Ȥ���
+���ߤΥ���դ�������뤫���ޤ��ϥե��������¸���ޤ���
+���ʤ����������˥塼�� "save to png" �����򤷤�������ե�����ϡ�
+\textit{set term png; replot;} �ˤ�ä�������ե�����Ȥ�
+�㤦��Τˤʤ�ޤ���
 
 %%% \subsection{How do I include my graphs in <word processor>?}
 \subsection{�ɤ���ä��饰��դ��ץ��եȤ˼�����ޤ���}
@@ -825,14 +821,13 @@ gnuplot> set term pop
 �٤������ȤϤ��Υ�ץ��եȤ˰�¸���ޤ���
 \verb+set term+ �Ȥ��ƻ��ѤǤ���ե���������Υꥹ�Ȥ򸫤Ƥ���������
 
-%%% Many word processors can use Encapsulated PostScript for graphs. 
-%%% This can be generated by the 
-%%% \verb+set terminal postscript eps [color]+ 
-%%% command.
-¿���Υ�ץ��եȤ� Encapsulated PostScript (EPS) �Υ���դ������ޤ���
-����� \\
-\verb+set terminal postscript eps [color]+ %
-�Ȥ������ޥ�ɤ������Ǥ��ޤ���
+%%% Many word processors can use Encapsulated PostScript (*.eps) for graphs. 
+%%% You can select eps output in \gnuplot{} using the
+%%% \verb+set terminal postscript eps+
+¿���Υ�ץ��եȤ� Encapsulated PostScript (*.eps) �Υ���դ������ޤ���
+\gnuplot{} �Ǥϡ�\\
+\verb+set terminal postscript eps+ %
+��Ȥ����Ȥ� eps ���Ϥ�����Ǥ��ޤ���
 %% end Japanese
 %%% Note that it is a good idea to check and correct the bounding box of the
 %%% graphs in the eps files (manually or by the fixbb script from gnuplot
@@ -843,18 +838,16 @@ gnuplot> set term pop
 (��ư�����뤤�� gnuplot Web �ڡ����ˤ��� fixbb ������ץȤˤ�ä�)��
 %% end Japanese
 %%% Some (most?) word processors do not preview the actual image in the eps
-%%% file, and you have to add the preview image yourself. You can use the GSView
+%%% file, and you have to add the preview image yourself. You can use the 
+%%% GSView
 %%% viewer for this (available for OS/2, Windows and X11), or some Unix ps
-%%% tool. Note that the preview image increases size of the eps file; the
-%%% smallest increase you may get by choosing Tiff 6 Packbits.
+%%% tool. 
 �����Ĥ��� (����� ?) ��ץ��եȤϡ�
 EPS �ե�����˴ޤޤ��ºݤβ�����ɽ�����ޤ���Τǡ�
 ɽ�����᡼���򤢤ʤ����Ȥ��ɲä���ɬ�פ�����ޤ���
 ������Ū�Τ���ˤϡ�GSView �ӥ塼�� %
 (OS/2, Windows, X11 �Ѥ�����ޤ�)��
 ���뤤�Ϥ����Ĥ��� Unix ��� ps �ġ��뤬�Ȥ��ޤ���
-��դ��Ƥ����ޤ�����ɽ���Ѥβ����� EPS �ե�����Υ����������礵���ޤ���
-Tiff 6 �ѥå��ӥåȤ����򤹤�кǤ⤽�����ä򲡤��뤳�Ȥ��Ǥ��ޤ���
 
 %%% Some Windows office applications, including OpenOffice.org, can handle
 %%% vector images in EMF format. These can be either produced by the emf 
@@ -872,16 +865,17 @@ OpenOffice.org 
 %%% There are many ways to use gnuplot to produce graphs for inclusion in a
 %%% \TeX\ or \LaTeX\ document.  
 %%% Some terminals produce *.tex fragments for direct inclusion; others 
-%%% produce *.eps, *.pdf, *.png output to be included using the \\includgraphics
-%%% command.  The epslatex and cairolatex terminals produce both a graphics
+%%% produce *.eps, *.pdf, *.png output to be included using the 
+%%% \textbackslash{}includgraphics command.
+%%% The epslatex and cairolatex terminals produce both a graphics
 %%% file (*.eps or *.pdf) and a *.tex document file that refers to it.
 %%% Gnuplot version 4.6 has a tikz terminal type that produces full text and
 %%% graphics when the output is processed with pdflatex.
 gnuplot ��Ȥä� \TeX\ �� \LaTeX\ ʸ��˼����ि��Υ���դ�����ˡ��
 ���̤�⤢��ޤ���
 ������ *.tex �ե���������Ҥ�ľ������������Ϸ����⤢��ޤ�����
-\\includegraphics ���ޥ�ɤ�ȤäƼ����ि��� *.eps, *.pdf, *.png ���Ϥ�
-���������Τ⤢��ޤ���
+\textbackslash{}includegraphics ���ޥ�ɤ�ȤäƼ����ि��� %
+*.eps, *.pdf, *.png ���Ϥ����������Τ⤢��ޤ���
 epslatex �� cairolatex ���Ϸ����ϡ������ե����� (*.eps �� *.pdf) ��
 ����򻲾Ȥ��� *.tex ʸ��ե������ξ�����������ޤ���
 gnuplot 4.6 �ˤ� tikz ���Ϸ��������ꡢ���Ϥ� pdflatex �ǽ����������
@@ -912,35 +906,14 @@ mif 
 
 \begin{itemize}
 
-%%% \item X11 toolkits: You can use the terminal type fig
-%%% and use the \textbf{xfig} drawing program to edit the
-%%% plot afterwards. You can obtain the xfig program from its web site
-%%% \http{www.xfig.org}. More information about the text-format used
-%%% for fig can be found in the fig-package.
-\item X11 �ġ��륭�å�:
-fig ���Ϸ�����Ȥäơ����θ�Ǥ���������Խ����뤿�������ץ���� %
-\textbf{xfig} ��Ȥ��Ф����Ǥ��礦��
-xfig �ץ����Ϥ��� Web ������ \http{www.xfig.org} ��������Ǥ��ޤ���
-fig �˻Ȥ���ƥ����ȥե����ޥåȤ˴ؤ��롢
-���ܤ�������ˤĤ��ƤϤ��� fig �ѥå������˴ޤޤ�Ƥ��ޤ���
-
-%%% You may use the tgif terminal, which creates output suitable for
-%%% reading within \texttt{tgif} (\http{http://bourbon.usc.edu/tgif/}),
-%%% an interactive 2-D drawing tool under X11.
-tgif ���Ϸ�����Ȥ����Ȥ�Ǥ��ޤ���
-����� X11 ��ư�����÷� 2 ��������ġ��� \texttt{tgif}
-(\http{http://bourbon.usc.edu/tgif/}) %
-���ɤޤ���Τ�Ŭ�������Ϥ��������ޤ���
-
-%%% \item You may use the svg terminal (scalable vector graphics), which can
+%%% \item \textbf{svg} terminal (scalable vector graphics) output can
 %%% be further edited by a svg editor, e.g. 
 %%% \textbf{Inkscape} (\http{www.inkscape.org}),
 %%% \textbf{Skencil} (\http{www.skencil.org}) or
 %%% \textbf{Dia} (\http{projects.gnome.org/dia/}), or loaded
 %%% into \textbf{OpenOffice.org} with an on-fly conversion into OO.o Draw
 %%% primitives.
-\item svg ���Ϸ��� (scalable vector graphics) ��Ȥ����Ȥ�Ǥ��ޤ���
-����� %
+\item \textbf{svg} ���Ϸ��� (scalable vector graphics) �ν��Ϥ� %
 \textbf{Inkscape} (\http{www.inkscape.org}),
 \textbf{Skencil} (\http{www.skencil.org}), 
 \textbf{Dia} (\http{projects.gnome.org/dia/}), %
@@ -989,53 +962,33 @@ Gimp 
 %%% including color, thickness, point shape, etc.  The command \verb+test+ will
 %%% display a test page for the currently selected terminal type showing
 %%% the available pre-defined combinations of color, size, shape, etc.
-%%% The \verb+set style+ command can be used to define additional combinations.
+%%% You can use the command \textit{set linetype} to change this or 
+%%% define additional combinations.
 gnuplot �ϡ��㤨�п������������η��ʤɤΡ�
 �������ο�����°�������ꤹ�뤿����͡��ʥ��ޥ�ɤ��󶡤��Ƥ��ޤ���
 ���ޥ�� \verb+test+ �ϡ��������򤵤�Ƥ�����Ϸ����ѤΡ�
 ���Ѳ�ǽ������Ѥߤο��������������ʤɤ��ȹ礻�򼨤�
 �ƥ��ȥڡ�������Ϥ��ޤ���
-
+���ޥ�� \textit{set linetype} ��Ȥ����Ȥ�
+������ѹ������ꡢ���餿���Ȥ��ɲ�����Ǥ��ޤ���
 
 %%% \subsection{Can I animate my graphs?}
 \subsection{����դ򥢥˥᡼����󲽤Ǥ��ޤ���}
 
-%%% First have a look at animate.dem in the demo directory
-%%% of \gnuplot. Basically, animated graphs are a sequence of
-%%% plots in a suitable format.
-�ǽ�ˡ�\gnuplot{} �� demo �ǥ��쥯�ȥ�ˤ��� animate.dem �򸫤Ƥ���������
-����Ū�˥���դΥ��˥᡼�����ϡ�
-Ŭ���ʥե����ޥåȤ�ʣ�����������ɽ������ޤ���
-
-%%% If your installation of \gnuplot{} is linked with gd 2.0.29 or newer (see
-%%% previous entry), the gif terminal can generate directly an animated GIF.
-���ʤ��� \gnuplot{} �� gd 2.0.29 �ʹ� (ľ���ι໲��) %
-���󥯤��ƺ��줿��ΤǤ���С�
-gif ���Ϸ�����ľ�ܥ��˥᡼����� GIF ����������Ǥ��ޤ��� 
-
-%%% Otherwise, have a look at the tool whirlgif 3.04. It reads run-length 
-%%% encoded GIF files and packs them into a minimal animation.
-%%% On the web-pages you will find a manual and an example.
-�����Ǥʤ���С�whirlgif 3.04 �Ȥ����ġ�������ꤷ�Ƥ���������
-����ϥ���󥰥����̤��줿ʣ��� GIF �ե�������ɤ�ǡ�
-������Ǿ��Υ��˥᡼�����ե�����ˤޤȤ�ޤ��� 
-�ޥ˥奢�����ϡ����� Web �ڡ����ǻ��ȤǤ��ޤ���
-
-%%% You can also write a small script to get \gnuplot{} to output a family
-%%% of GIF files, then have it execute some animator such as gifsicle:
-%%% \http{www.lcdf.org/~eddietwo/gifsicle}
-%%% or gifmerge
-%%% \http{the-labs.com/GIFMerge}.
-�ޤ��������ʥ�����ץȤ�񤤤� %
-\gnuplot{} ��ʣ��� GIF �ե���������������뤳�Ȥ�Ǥ��ޤ���
-������ gifsicle (\http{www.lcdf.org/~eddietwo/gifsicle}) �� %
-gifmerge (\http{the-labs.com/GIFMerge}) �Τ褦��
-¾�Υ��˥᡼���������ġ����Ȥ����Ȥ�Ǥ��ޤ���
-
-%%% mpeg\_encode will encode a sequence of images into an mpeg format movie.
-mpeg\_encode ��Ȥ��� %
-mpeg �ե����ޥåȤ�ư�����ˤޤȤ�뤳�Ȥ�Ǥ���Ǥ��礦��
+%%% Only \gnuplot{} terminal type directly outputs an animated file:
+\gnuplot{} ���Ϸ�����ľ�ܥ��˥᡼�����ե��������ϤǤ���Τ�
+�ʲ��Τ�Τ����Ǥ�:
+%% end Japanese
+\begin{verbatim}
+set terminal gif animate {delay <time>} {loop <N>} {optimize}
+\end{verbatim}
 
+%%% Have a look at
+%%% \http{http://gnuplot.sourceforge.net/demo/animate.html}
+%%% in the demo collection.
+�ǥ�����
+\http{http://gnuplot.sourceforge.net/demo/animate.html}
+�⻲�Ȥ��Ƥ���������
 
 %%% \subsection{How do I plot implicit defined graphs?}
 \subsection{�ɤ���ä��鱢�ؿ�Υ���դ��񤱤ޤ���}
@@ -1045,6 +998,7 @@ mpeg 
 \gnuplot{} �Ǥϱ��ؿ�Υ���դ������ľ�ܤ�����Ǥ��ޤ���
 �������������κ��Ϥ���ޤ���
 %% end Japanese
+%%% \small
 %%% \begin{verbatim}
 %%% gnuplot> # An example. Place your definition in the following line:
 %%% gnuplot> f(x,y) = y - x**2 / tan(y)
@@ -1056,6 +1010,8 @@ mpeg 
 %%% gnuplot> unset table
 %%% gnuplot> plot 'curve.dat' w l
 %%% \end{verbatim}
+%%% \normalsize
+\small
 \begin{verbatim}
 gnuplot> # ��: ���ιԤ�Ŭ����������֤������Ƥ���������
 gnuplot> f(x,y) = y - x**2 / tan(y)
@@ -1067,6 +1023,7 @@ gnuplot> splot f(x,y)
 gnuplot> unset table
 gnuplot> plot 'curve.dat' w l
 \end{verbatim}
+\normalsize
 %% end Japanese
 %%% The trick is to draw the single contour line z=0 of the surface
 %%% z=f(x,y), and store the resulting contour curve to a \gnuplot{} datafile.
@@ -1078,12 +1035,13 @@ gnuplot> plot 'curve.dat' w l
 \subsection{2 �Ĥζ����֤��ΰ���ɤ�Ĥ֤��ˤ�}
 
 %%% A plot with filled area between two given curves can be easily obtained using
-%%% the pseudo file '+' with \texttt{filledcurves closed}. The example below
+%%% the pseudo file '+' with \textit{filledcurves closed}. The example below
 %%% demonstrates this for two curves f(x) and g(x):
 2 �Ĥ�Ϳ����줿�����δ֤��ɤ�Ĥ֤�����ϡ�
-�����ե����� '+' �� \verb+filledcurves closed+ ��Ȥ��д�ñ�ˤǤ��ޤ���
+�����ե����� '+' �� \textit{filledcurves closed} ��Ȥ��д�ñ�ˤǤ��ޤ���
 �ʲ�����ϡ�2 �Ĥζ��� f(x) �� g(x) ���Ф���ǥ�Ǥ�:
 %% end Japanese
+\small
 \begin{verbatim}
 f(x)=cos(x)
 g(x)=sin(x)
@@ -1091,27 +1049,28 @@ xmax=pi/4
 set xrange [0:xmax]
 plot '+' using 1:(f($1)):(g($1)) with filledcurves closed
 \end{verbatim}
+\normalsize
 
 %%% Note that the above code fills area between the two curves, not 
 %%% area satisfying
 %%% inequality g(x)<f(x). If you want the latter, you should use the ternary
-%%% operator in \texttt{using} statement to return an undefined value (0/0) 
+%%% operator in \textit{using} statement to return an undefined value (0/0) 
 %%% if the
 %%% inequality is not satisfied.
 ��դ��Ƥ�餤�����ΤǤ�����
 ������ 2 �Ĥζ����δ֤��ΰ���ɤ�Ĥ֤���ΤǤ��äơ�
 ������ g(x)<f(x) ���������ΰ���ɤ�Ĥ֤���ΤǤϤ���ޤ���
 �⤷����Ԥ�Ԥʤ������ʤ顢
-\verb+using+ ��ʬ�� 3 ��黻�Ҥ�Ȥäơ�
+\textit{using} ��ʬ�� 3 ��黻�Ҥ�Ȥäơ�
 ��������������������ʤ�����̤����� (0/0) %
 ���֤��褦�ˤ���ɬ�פ�����ޤ���
 
-%%% See the documentation for \texttt{help filledcurves}, 
-%%% \texttt{help special-filenames}, and \texttt{help ternary} and see
-%%% \texttt{fillbetween.dem} in the \texttt{demos} directory.
-texttt{help filledcurves}, \texttt{help special-filenames}, 
-\texttt{help ternary} �˴ؤ���ɥ�����Ȥ򻲾Ȥ��Ƥ���������
-\texttt{demos} �ǥ��쥯�ȥ���� \texttt{fillbetween.dem} �⻲�Ȥ��Ƥ���������
+%%% See the documentation for \textit{help filledcurves}, 
+%%% \textit{help special-filenames}, and \textit{help ternary} and see
+%%% \textit{fillbetween.dem} in the \textit{demos} directory.
+textit{help filledcurves}, \textit{help special-filenames}, 
+\textit{help ternary} �˴ؤ���ɥ�����Ȥ򻲾Ȥ��Ƥ���������
+\textit{demos} �ǥ��쥯�ȥ���� \textit{fillbetween.dem} �⻲�Ȥ��Ƥ���������
 
 %%% \subsection{Pm3d splot from a datafile does not draw anything}
 \subsection{pm3d �ˤ��ǡ����ե������ splot �Dz���ɽ������ޤ���}
@@ -1143,18 +1102,22 @@ gnuplot 
 ��ͭ�Ѥǡ��ǡ����ե�����ˡ�
 �� 1 ���ܤο��ѹ������Ȥ��˶��Ԥ��ɲä��Ƥ���ޤ���
 %% end Japanese
+%%% \small
 %%% \begin{verbatim}
 %%% /^[[:blank:]]*#/ {next} # ignore comments (lines starting with #)
 %%% NF < 3 {next} # ignore lines which don't have at least 3 columns
 %%% $1 != prev {printf "\n"; prev=$1} # print blank line
 %%% {print} # print the line
 %%% \end{verbatim}
+%%% \normalsize
+\small
 \begin{verbatim}
 /^[[:blank:]]*#/ {next} # �����ȹ� (# �ǻϤޤ��) ��̵��
 NF < 3 {next} # 3 ��̤�������ʤ��Ԥ�̵��
 $1 != prev {printf "\n"; prev=$1} # ���Ԥ����
 {print} # ���ιԼ��Τ����
 \end{verbatim}
+\normalsize
 %% end Japanese
 %%% Then, either preprocess your data file by command
 %%% \verb+awk -f addblanks.awk <a.dat+ or plot the datafile under a 
@@ -1162,32 +1125,17 @@ $1 != prev {printf "\n"; prev=$1} # 
 %%% by \verb+gnuplot> splot "<awk -f addblanks.awk a.dat"+.
 ����ˤ�ꡢ�ǡ����ե�����򥳥ޥ�� \verb+awk -f addblanks.awk <a.dat+ %
 �ˤ�ä����������뤫��
-unix �ߴ��Υץ�åȥե������ǥǡ����ե������ %
+unix �ߴ��Υץ�åȥե������ǥǡ����ե������ \\
 \verb+gnuplot> splot "<awk -f addblanks.awk a.dat"+ �Τ褦�����褹�뤫��
 �Τɤ��餫��ԤäƤ���������
 
+%%% \subsection{Drawing 2D projection of 3D data}
+\subsection{3 �����ǡ����� 2 �����ͱƤ����褹��ˤ�}
 
-%%% \subsection{Drawing a (color) map, i.e. 2D projection of 3D data}
-\subsection{(��) �Ͽޥ���ա����ʤ�� 3 �����ǡ����� 2 �����ͱƤ����褹��ˤ�}
-
-%%% Use \texttt{set view map; unset surface} or \texttt{set pm3d map} rather than
-%%% \texttt{set view 180,0}. The latter facilitates drawing matrices 
-%%% or data files
-%%% as maps, even without the necessity for matrix-like data organization
-%%% (gridding). It is possible to decrease the output postscript file size by
-%%% postprocessing it by \texttt{pm3dCompress.awk} or
-%%% \texttt{pm3dConvertToImage.awk}.
-\texttt{set view 180,0} �Ȥ�����⡢�ष�� %
-\texttt{set view map; unset surface} ����
-\texttt{set pm3d map} ��ȤäƤ���������
-��ԤϹ����ǡ����ե�������Ͽޥ���դ������ڤˤ��Ƥ���ޤ���
-�����⡢�ǡ����ι��� (�ʻҲ�) ��ɬ�פ⤢��ޤ���
-\texttt{pm3dCompress.awk} �� \texttt{pm3dConvertToImage.awk} %
-�ˤ�������ˤ�äơ�
-��������� postscript �ե�����Υ������򾮤������뤳�Ȥ��ǽ�Ǥ���
-
+%%% Use \textit{set view map}
 %%% There are also plotting styles \verb+with image+ and \verb+with rgbimage+
 %%% for plotting 2D color images.
+\textit{set view map} ����Ѥ��Ƥ���������
 2 �����Υ��顼�����������Ѥˤϡ����襹������ \verb+with image+ �� %
 \verb+with rgbimage+ �ʤɤ��Ѱդ���Ƥ��ޤ���
 
@@ -1197,95 +1145,56 @@ unix 
 %%% Use the explicit (see also implicit) switch of the pm3d style:
 pm3d ��������� explicit �����å� (implicit �⻲�ȤΤ���) ��ȤäƤ�������:
 %% end Japanese
+\small
 \begin{verbatim}
 gnuplot> set pm3d explicit
 gnuplot> splot x with pm3d, x*y with points
 \end{verbatim}
+\normalsize
 
+%%% \subsection{How to produce labeled contours}
+\subsection{��٥�Ĥ��������������褹��ˤ�}
 
-%%% \subsection{How to draw black contour plot, and contours with labels}
-\subsection{�������������衢�ޤ��ϥ�٥�Ĥ��������������褹��ˤ�}
-
-%%% Well, it is very simple even though it is hard to discover: 
-%%% \verb+unset clabel+.
-���äȡ����Ĥ���Τ��񤷤����⤷��ޤ��󤬡�����ϼ¤˴�ñ: 
-\verb+unset clabel+
-%% end Japanese
-\begin{verbatim}
-set contour both; set cntr levels 100
-unset clabel
-unset surface
-splot x*y with line lt -1
-pause -1
-splot x*y with line palette
-\end{verbatim}
-
-%%% Another solution requires to write contours into a temporary file using
-%%% \verb+set table+.
-¾�Τ�����Ȥ��Ƥϡ�\verb+set table+ �����Ѥ�����������
-����ե�����˽񤭽Ф��꤬����ޤ�:
-%% end Japanese
-\begin{verbatim}
-set contour base; set cntrparam levels 15; unset surface; set view map
-splot x*x+y*y; pause -1
-set table 'contour.dat'
-replot
-unset table
-\end{verbatim}
-%%% Now, for drawing it in 2D, do
-���θ�ǡ�2 �������褹��ˤϼ��Τ褦�ˤ��ޤ���
-%% end Japanese
-\begin{verbatim}
-reset
-plot 'contour.dat' with line -1
-\end{verbatim}
-%%% and for contours in 3D do
-3 �������褹����ϼ��Τ褦�ˤ��ޤ���
+%%% Labeling individual contous in a contour plot required special
+%%% tricks and extra processing steps in \gnuplot{} version 4.
+%%% See
+%%% \http{gnuplot.sourceforge.net/scripts/index.html\#tricks-here}.
+�ġ����������˥�٥��Ĥ�������դϡ�\gnuplot{} �С������ 4 �Ǥ�
+������΢����;ʬ�ʽ�����礬ɬ�פǤ����ʲ��򻲾Ȥ��Ƥ�������:
+\http{gnuplot.sourceforge.net/scripts/index.html\#tricks-here}
+
+%%% In version 5 the procedure is much simpler.  Plot the contours twice,
+%%% once "with lines" and once "with labels".  To make the labels stand out
+%%% it may help set use 
+�С������ 5 �Ǥϡ����μ��ϤȤƤ��ñ�Ǥ���
+��������1 ���ܤ� "with lines" �ǡ�2 ���ܤ� "with labels" �� %
+2 �����褹������Ǥ���
+��Ω�ĥ�٥��������������ϡ��ʲ��Τ褦���������Ѥ���Ȥ����Ǥ��礦��
 %% end Japanese
-%%% \begin{verbatim}
-%%% reset
-%%% # Change single blank lines to double blank lines
-%%% !awk "NF<2{printf\"\n\"}{print}" <contour.dat >contour1.dat
-%%% splot 'contour1.dat' with line -1
-%%% \end{verbatim}
 \begin{verbatim}
-reset
-# 1 �Ԥζ��Ԥ� 2 �Ԥζ��Ԥ��Ѵ�
-!awk "NF<2{printf\"\n\"}{print}" <contour.dat >contour1.dat
-splot 'contour1.dat' with line -1
+set style textbox opaque noborder
+set contours
+splot 'DATA' with line, 'DATA' with labels boxed
 \end{verbatim}
-%% end Japanese
-%%% See also the following question "How to overlay contour plot over 
-%%% pm3d map/surface".
-���� "pm3d ���Ͽ�/���̥���դ���������Ťͤ�ˤ�" �⻲�Ȥ��Ƥ���������
-
-%%% Labelling contours by their z-value can be achieved by a suitable script
-%%% generating automatically the appropriate \verb+set label+ commands; 
-%%% you can find
-%%% one at gnuplot scripts page
-%%% \http{gnuplot.sourceforge.net/scripts/index.html\#tricks-here}.
-z ���ͤˤ���������Υ�٥�ϡ�
-Ŭ���� \verb+set label+ ���ޥ�ɤ�
-��ưŪ���������Ƥ����Ŭ���ʥ�����ץȤǼ¸��Ǥ���Ǥ��礦��
-���Τ褦�ʰ�Ĥ� gnuplot ������ץȤΥڡ��� %
-\http{gnuplot.sourceforge.net/scripts/index.html\#tricks-here} %
-�ˤ���ޤ���
 
 
 %%% \subsection{How to overlay contour plot over pm3d map/surface}
 \subsection{pm3d ���Ͽ�/���̥���դ���������Ťͤ�ˤ�}
 
+%%% [Not needed any more?]
 %%% This requires you to write contours into a temporary file 
 %%% using the table
 %%% terminal, and then use this file in the final drawing without set contours.
 %%% The following example demonstrates this for a map; for surface, remove 
 %%% \verb+set pm3d map+ and put \verb+set ticslevel 0+.
+[��������?]
 ����ϡ��������� table ���Ϸ��������Ѥ��ư���ե�����˽񤭽Ф���
 �����Ƥ���� set contours ��Ȥ鷺�����褹��ɬ�פ�����ޤ���
 ������Ͽ��Ͽޥ���դΥǥ�Ǥ�����
 ���̥���դξ��� %
 \verb+set pm3d map+ �������� \verb+set ticslevel 0+ ������ޤ���
 %% end Japanese
+%%% \small
 %%% \begin{verbatim}
 %%% # Write contours of function  x*x-y*y  to a (temporary) file
 %%% set contour base; set cntrparam level 20
@@ -1306,7 +1215,9 @@ z 
 %%% splot x*x+y*y with pm3d, 'contour1.dat' with line lt -1
 %%% !rm contour.dat contour1.dat
 %%% \end{verbatim}
+%%% \normalsize
 %% begin Japanese
+\small
 \begin{verbatim}
 # �ؿ� x*x-y*y �������������ե�����˽񤭽Ф�
 set contour base; set cntrparam level 20
@@ -1327,6 +1238,7 @@ set pm3d explicit
 splot x*x+y*y with pm3d, 'contour1.dat' with line lt -1
 !rm contour.dat contour1.dat
 \end{verbatim}
+\normalsize
 %% end Japanese
 %%% The last command deletes the two temporary files.
 �Ǹ�Υ��ޥ�ɤ� 2 �Ĥΰ���ե�����������ޤ���
@@ -1340,6 +1252,7 @@ splot x*x+y*y with pm3d, 'contour1.dat' with line lt -1
 3 ����ʪ�Τ��̤˿���Ĥ������褹��ˤϡ�
 �ե������ʲ��Τ褦�ʷ����Ǻ�������в�ǽ�Ǥ���
 
+%%% \small
 %%% \begin{verbatim}
 %%% # triangle 1
 %%% x0 y0 z0 <c0>
@@ -1353,7 +1266,9 @@ splot x*x+y*y with pm3d, 'contour1.dat' with line lt -1
 %%% x y z
 %%% ...
 %%% \end{verbatim}
+%%% \normalsize
 %% begin Japanese
+\small
 \begin{verbatim}
 # ���ѷ� 1
 x0 y0 z0 <c0>
@@ -1367,28 +1282,31 @@ x2 y2 z2 <c2>
 x y z
 ...
 \end{verbatim}
+\normalsize
 %% end Japanese
 
-%%% Notice the positioning single and double blank line. \texttt{<c>} 
+%%% Notice the positioning single and double blank line. \textit{<c>} 
 %%% is an optional
 %%% color.
 1 �Ԥζ��Ԥ� 2 �Ԥζ��Ԥΰ��֤���դ��Ƥ���������
-\texttt{<c>} �ϥ��ץ����ο�����Ǥ���
+\textit{<c>} �ϥ��ץ����ο�����Ǥ���
 
 %%% Then plot it by (either of splot's):
 �����ʲ��Τ褦�ˤ������褷�ޤ� (�ɤ��餫�� splot ��):
 %% end Japanese
+\small
 \begin{verbatim}
 set pm3d
 set style data pm3d
 splot 'facets.dat'
 splot 'facets_with_color.dat' using 1:2:3:4
 \end{verbatim}
+\normalsize
 
-%%% Note that you avoid surface lines by \texttt{set style data pm3d} or 
-%%% \texttt{splot ... with pm3d}.
+%%% Note that you avoid surface lines by \textit{set style data pm3d} or 
+%%% \textit{splot ... with pm3d}.
 ���̤����ϡ�
-\texttt{set style data pm3d} ����\texttt{splot ... with pm3d} %
+\textit{set style data pm3d} ����\textit{splot ... with pm3d} %
 ��̵���ˤǤ��뤳�Ȥ���դ��Ƥ���������
 
 %%% In the above example, pm3d displays triangles as independent surfaces.
@@ -1423,12 +1341,12 @@ gnuplot 
 
 %%% Consequently, gnuplot won't draw your surface or 3D object as 
 %%% a virtual reality.
-%%% It works OK for \texttt{set pm3d map} but for true 3D you would 
+%%% It works OK for \textit{set pm3d map} but for true 3D you would 
 %%% be probably more
 %%% happy writing a convertor of your facets into a VRML file.
 ��̤Ȥ��ơ�
 gnuplot �϶��̤� 3 ������ʪ�Τ��۸��¤Ȥ��Ƥ����褷�ޤ���
-����� \texttt{set pm3d map} ���Ф��ƤϤ�����Ư���ޤ�����
+����� \textit{set pm3d map} ���Ф��ƤϤ�����Ư���ޤ�����
 ������ 3 �����ˤ������ʤ顢
 ¿���Υǡ����� VRML �ե�������Ѵ����륽�եȤ�������������⤷��ޤ���
 
@@ -1438,21 +1356,21 @@ gnuplot 
 %%% printer?}
 \subsection{���Ͽޤ��Υ���Υץ�󥿤Ǥ�����Ȱ�������褦�ʥѥ�åȤ�}
 
-%%% Try \texttt{set palette cubehelix}.
-\texttt{set palette cubehelix} ���Ƥ���������
+%%% Try \textit{set palette cubehelix}.
+\textit{set palette cubehelix} ���Ƥ���������
 
 
 %%% \section{Wanted features}
 \section{�ߤ�����ǽ (Wanted features)}
 
-%%% \subsection{What's new in \gnuplot{} 4.2, 4.4 etc?}
-\subsection{\gnuplot{} 4.2, 4.4 ���ǿ������ʤä����Ȥ�}
+%%% \subsection{What's new in \gnuplot{} 4.6, 5.0 etc?}
+\subsection{\gnuplot{} 4.6, 5.0 ���ǿ������ʤä����Ȥ�}
 
-%%% Too many things to be named here.
-%%% Please refer to the \texttt{NEWS} file in the source distribution, or the
+%%% Too many things to list here.
+%%% Please refer to the \textit{NEWS} file in the source distribution, or the
 %%% "New features" section in the gnuplot documentation.
-�����˵����ˤ�¿�����ޤ���
-����������ʪ�˴ޤޤ��ե����� \texttt{NEWS}��
+�����ˤ�����ˤ�¿�����ޤ���
+����������ʪ�˴ޤޤ��ե����� \textit{NEWS}��
 ���뤤�� gnuplot �Υإ�ץɥ�����Ȥ� "New features" �Υ���������
 ���Ȥ��Ƥ���������
 
@@ -1465,7 +1383,7 @@ gnuplot 
 ���󥹥ȡ���Ѥ� \gnuplot{} �����ѤǤ��륰��ե��å��ɥ饤�Фΰ����򸫤�ˤϡ�
 \verb+set term+ �ȥ����פ��Ƥ���������
 
-%%% Some graphics drivers are included in the normal distribution,
+%%% Some graphics drivers are included in the normal distribution
 %%% but are not built by default. If you want to use them, you'll
 %%% have to change file \verb+gnuplot/src/term.h+, and recompile.
 �̾������ʪ�ˤϴޤޤ�Ƥ��Ƥ⡢
@@ -1483,37 +1401,37 @@ gnuplot 
 %%% \subsection{Does \gnuplot{} support bar-charts/histograms/boxes?}
 \subsection{\gnuplot{} ���������/�ҥ��ȥ����/Ȣ������դ��񤱤ޤ���}
 
-%%% Various clustered and stacked histogram styles are supported in \gnuplot\ 
-%%% version 4.2 and later as separate style types.
-\gnuplot\ version 4.2 �ʹߤǤϡ����¤ӷ� (clustered) %
-���Ѥ߾夲�� (stacked) �Υҥ��ȥ���ॹ�����뤬��
-�̡��Υ������뷿�Ȥ��ƥ��ݡ��Ȥ���Ƥ��ޤ���
-
-%%% \subsection{Does \gnuplot{} support pie charts?}
-\subsection{\gnuplot{} �ϱߥ���դ��񤱤ޤ���}
-
-%%% It's sort of difficult in \gnuplot, see
-%%% \http{http://gnuplot-tricks.blogspot.com/2009/08/pie-charts-entirely-in-gnuplot.html},
-%%% or have a look at
-%%% \http{www.usf.uni-osnabrueck.de/~breiter/tools/piechart/piecharts.en.html}.
-����� \gnuplot �ǤϤ���ä����ݤǤ����ʲ��򸫤Ƥ���������
-\http{http://gnuplot-tricks.blogspot.com/2009/08/pie-charts-entirely-in-gnuplot.html}
+%%% \Gnuplot{} supports various clustered and stacked histogram styles 
+%%% to display
+%%% pretabulated data.  It also offers a few options for accummulating 
+%%% raw data
+%%% into bins, which can in turn be displayed as a bar chart.  See the 
+%%% documentation
+%%% for \textit{smooth frequency}.
+\gnuplot{} �ϡ����餫����ɽ�����ˤ��줿�ǡ�����ɽ�����뤿��Ρ�
+���ޤ��ޤʲ��¤ӷ� (clustered) ���Ѥ߾夲�� (stacked) ��
+�ҥ��ȥ���ॹ������򥵥ݡ��Ȥ��Ƥ��ޤ���
+�ޤ������Υǡ�������������Ѥ��뤿��Τ����Ĥ��Υ��ץ������󶡤��Ƥ��ơ�
+������ڤ��ؤ���������դȤ���ɽ�������뤳�Ȥ��ǽ�Ǥ���
+�ޥ˥奢��� \textit{smooth frequency} ����ʬ�򻲾Ȥ��Ƥ���������
+
+%%% \subsection{Does \gnuplot{} support pie charts? quarterly time charts?}
+\subsection{\gnuplot{} �ϱߥ���դ��񤱤ޤ�������Ⱦ������դϤɤ��Ǥ���}
+
+%%% Pie charts are sort of difficult in \gnuplot, but see
+%%% \http{http://gnuplot.sourceforge.net/demo/circles.html}, 
+%%%  or have a look at
+%%% \http{http://gnuplot-tricks.blogspot.com/2009/08/pie-charts-entirely-in-gnuplot.html}.
+�ߥ���դ� \gnuplot{} �ǤϤ���ä����ݤǤ������ʲ��򸫤Ƥ���������
+\http{http://gnuplot.sourceforge.net/demo/circles.html} 
 �ޤ��ϡ��ʲ��򻲾Ȥ��Ƥ���������
-\http{www.usf.uni-osnabrueck.de/~breiter/tools/piechart/piecharts.en.html}
-
-
-%%% \subsection{Does \gnuplot{} quarterly time charts?}
-\subsection{\gnuplot{} �ϻ�Ⱦ�����㡼�Ȥ��񤱤ޤ���}
-
-%%% It's not possible in \gnuplot, but have a look at
-%%% \http{ricardo.ecn.wfu.edu/~cottrell/qplot}. The corresponding
-%%% file \verb+qplot.zip+ can be obtained from the contrib directory
-%%% on any \gnuplot{} server.
-\gnuplot{} �ǤϤ���ϤǤ��ޤ��󡣤��������ʲ��򸫤Ƥ���������
-\http{ricardo.ecn.wfu.edu/~cottrell/qplot} %
-���Υե����� \verb+qplot.zip+ �� \gnuplot{} �����ۥ����Ȥ� %
-contrib �ǥ��쥯�ȥ꤫������Ǥ��ޤ���
+\http{http://gnuplot-tricks.blogspot.com/2009/08/pie-charts-entirely-in-gnuplot.html}
 
+%%% The demo collection contains an example of a simple Gantt chart.  
+%%% This capability
+%%% is new in \gnuplot{} version 5.
+�ǥ����ˤ�ñ��ʥ���ȥ��㡼�Ȥ��㤬����ޤ���
+����ϡ�\gnuplot{} �С������ 5 �ο�������ǽ�Ǥ���
 
 %%% \subsection{Can I put multiple pages on one page?}
 \subsection{��ĤΥڡ�����ʣ��Υ���դ��񤱤ޤ���}
@@ -1524,23 +1442,44 @@ contrib 
 %%% \subsection{Does \gnuplot{} support multiple y-axes on a single plot?}
 \subsection{\gnuplot{} �ϰ�ĤΥ���դ�ʣ��� y ����Ȥ��ޤ���}
 
-%%% Yes. You can have 2 x- and 2 y-axes per plot. The additional axes are called
-%%% x2 and y2. See \verb+help plot+.
-�Ϥ���1 �Ĥ�������Ф��� 2 �Ĥ� x ����2 �Ĥ� y �����Ȥ��ޤ���
-���Τ��줾��� 2 ���ܤμ��� x2, y2 ���ȸƤФ�ޤ���
-\verb+help plot+ �򻲾Ȥ��Ƥ���������
+%%% Yes. 2D plots can have separate x axes at the bottom (x1) and top (x2),
+%%% and separate y axes at the left (y1) and right (y2).  Version 5 offers a
+%%% plot mode \textit{with parallelaxes} that allows additional y axes to be
+%%% defined.
+�Ϥ���2 ��������դǤ��̡��� x ���� (x1) �Ⱦ� (x2) ��
+���Ĥ��Ȥ��Ǥ��ޤ������̡��� y ���� (y1) �ȱ� (y2) �˻��Ĥ��Ȥ��Ǥ��ޤ���
+�С������ 5 �Ǥϡ�\textit{with parallelaxes} �Ȥ�������⡼�ɤ�
+y ���򤵤���ɲä��뤳�Ȥ�Ǥ��ޤ���
 
 
 %%% \subsection{Can I put both commands and data into a single file?}
 \subsection{��ĤΥե������ gnuplot �Υ��ޥ�ɤȥǡ�����ξ����񤱤ޤ���}
 
-%%% This is possible by the new \verb+plot "-"+ possibility. The
-%%% \verb+plot "-"+ command allows to read the data to be plot from
-%%% standard input or the current batch job.
-����� \verb+plot "-"+ �Ȥ�����������ǽ��Ȥ��в�ǽ�Ǥ���
-\verb+plot "-"+ ���ޥ�ɤ����褹��ǡ�����ɸ�����ϡ�
-�ޤ��ϸ��ߤΥХå�����֤����ɤ߹��ߤޤ���
-
+%%% Version 5 supports named blocks of data in "here document" format:
+�С������ 5 �Ǥϡ��֥ҥ��ɥ�����ȡ׷����Ǥ�̾���դ��ǡ����֥�å���
+���ݡ��Ȥ��Ƥ��ޤ�:
+%% end Japanese
+\small
+\begin{verbatim}
+gnuplot> $DATABLOCK << EOD
+cats 4 2
+dogs 1 4
+EOD
+gnuplot> plot $DATABLOCK using 2:3:1 with labels
+\end{verbatim}
+\normalsize
+%%% Once the named block has been defined, it can be used as many times
+%%% as you like.
+̾���դ��ǡ����֥�å��ϰ����������С�������٤Ǥ�Ȥ����Ȥ��Ǥ��ޤ���
+
+%%% Data can also be provided in-line as part of a plot command using the
+%%% pseudo-file \verb+plot "-"+.  In this case the data can only be used
+%%% once.
+�ǡ����ϡ�plot ���ޥ�ɾ�ǵ����ե�������� \verb+plot "-"+ ��
+�Ԥäƥ���饤�������Ϳ���뤳�Ȥ�Ǥ��ޤ���
+���ξ��ϡ��ǡ����ϰ��٤����Ȥ��ޤ���
+
+\small
 \begin{verbatim}
 gnuplot> plot "-"
 1 1
@@ -1548,6 +1487,7 @@ gnuplot> plot "-"
 3 9
 e
 \end{verbatim}
+\normalsize
 
 
 %%% \subsection{Can I put Greek letters and super/subscripts into my labels?}
@@ -1555,31 +1495,30 @@ e
 
 %%% Most terminal types (output device drivers) support an "enhanced text" mode.
 %%% This lets you use sub- and superscripts.  It also allows to use Greek
-%%% letters and math symbols to the extent that these are supported by the fonts
-%%% installed on your system.
+%%% letters and math symbols to the extent that these are supported by the 
+%%% fonts
+%%% installed on your system.  The simplest way to enter special characters of
+%%% any sort, if your system supports it, is to select UTF-8 encoding.  This
+%%% obviates the need to change fonts.
 ¿���ν��Ϸ��� (���ϥǥХ����ɥ饤��) �ǡ��ֳ�ĥʸ�������ץ⡼�� %
 ("enhanced text" �⡼��) �����ݡ��Ȥ���Ƥ��ơ�
 ����Ǿ��դ����դ���ʸ���������ޤ���
 ���ξ�硢���ʤ��Υ����ƥ�˥��󥹥ȡ��뤵��Ƥ���ե���Ȥ�
 ���ݡ��Ȥ����ϰ���ǡ����ꥷ��ʸ���䡢��ص���ʸ���ⰷ���ޤ���
-
-%%% You might try using the \LaTeX{} terminal type and putting text
-%%% like \verb+"\\alpha_{3}"+ or \verb+'\alpha_{3}'+ .
-\LaTeX{} ���Ϥ�Ԥʤ����Ϸ�����Ȥä� \verb+"\\alpha_{3}"+ �� %
-\verb+'\alpha_{3}'+ �Τ褦�ˤ��ƤߤƤ���������
-%% end Japanese
-%%% If you include your \gnuplot-graphs into a \LaTeX{} document
-%%% you can use the \LaTeX{}-package psfrag to typeset any characters
-%%% into your graphs.
-\gnuplot{} �Υ���դ� \LaTeX{} ��ʸ���ĥ�������ˤϡ�
-\LaTeX{} �ѥå������� psfrag ��Ȥ���
-��������Ǥ�դ�ʸ����Ȥ����Ȥ��Ǥ��ޤ���
-
-%%% One more possibility is to use the MetaPost terminal. It supports \TeX{}
-%%% syntax and is converted onto encapsulated PostScript by mpost.
-�⤦��Ĥβ�ǽ���� MetaPost ���ϤǤ�������� \TeX{} ��ɽ��ˡ�򥵥ݡ��Ȥ���
-mpost �ˤ�ä� encapsulated PostScript (EPS) ���Ѵ����ޤ���
-
+������ü�ʸ�������Ϥ���Ǥ��ñ����ˡ�ϡ�
+���ʤ��Υ����ƥब���ݡ��Ȥ��Ƥ���ФǤ�����
+UTF-8 ���󥳡��ǥ��󥰤����Ѥ��뤳�ȤǤ���
+����ˤ�ꡢ�ե���Ȥ��ѹ���ɬ�פ��ʤ��ʤ�ޤ���
+
+%%% The various \LaTeX{} terminal types (\textit{latex, epslatex, tikz, 
+%%% context, cairolatex})
+%%% hand off text generation to \LaTeX{}. In this case you can 
+%%% use normal \LaTeX{}
+%%% markup like \verb+"\\alpha_{3}"+ or \verb+'\alpha_{3}'+ .
+�����Ĥ��� \LaTeX{} �Ͻ��Ϸ��� (\textit{latex, epslatex, tikz, 
+context, cairolatex}) �ϡ���������ʸ����� \LaTeX{} ���Ϥ��ޤ���
+���ξ��ϡ�\verb+"\\alpha_{3}"+ �� \verb+'\alpha_{3}'+ �Τ褦��
+�̾�� \LaTeX{} ���ε��Ҥ����ѤǤ��ޤ���
 
 %%% \subsection{How do I include accented characters}
 \subsection{�ɤ������饢��������դ���ʸ������ϤǤ��ޤ���}
@@ -1595,29 +1534,29 @@ mpost 
 8bit ʸ�������ɤ���Ѥ��ʤ���Ф����ޤ���
 �㤨�м��Τ褦�ˤ��ޤ���
 
+\small
 \begin{verbatim}
 gnuplot> set encoding iso_8859_1
 gnuplot> set title "M\374nchner Bierverbrauch \374ber die Jahre"
 gnuplot> plot "bier.dat" u 1:2
 \end{verbatim}
+\normalsize
 
 %%% Consequently, you can type labels in Czech, French, Hungarian, Russian... by
-%%% means of an appropriate \texttt{set encoding}. However, you cannot mix two
+%%% means of an appropriate \textit{set encoding}. However, you cannot mix two
 %%% encodings in one file (e.g. accents for west and east latin encodings). 
-����ˤ�ꡢŬ�ڤ� \texttt{set encoding} �ˤ�ꡢ
+����ˤ�ꡢŬ�ڤ� \textit{set encoding} �ˤ�ꡢ
 �������졢ʩ�졢�ϥ󥬥꡼�졢Ϫ��ʤɤΥ�٥���Ǥ��Ф����Ȥ��Ǥ��ޤ���
 ��������2 ����Υ��󥳡��� (�㤨������ƥ󥨥󥳡��ɤ����ƥ󥨥󥳡���) %
 ���ĤΥե�����˺����뤳�ȤϤǤ��ޤ���
 
 %%% A more general solution is to use UTF-8 encoded fonts, and type the 
 %%% UTF-8 characters directly into gnuplot. This works for many terminal types
-%%% but not, unfortunately, PostScript.  Update: Version 4.4 contains
-%%% more complete support for UTF-8, including PostScript.
+%%% but is very cumbersome for PostScript.
 UTF-8 ���󥳡��ǥ��󥰥ե���Ȥ�Ȥ�����Τ�����Ū�ʤ�����ϡ�
 \gnuplot{} ���ľ�� UTF-8 ��ʸ�������Ϥ��뤳�ȤǤ���
-�����¿���ν��Ϸ�����ư��ޤ�������ǰ�ʤ��� PostScript �ǤϤ���Ǥ���
-��������: �С������ 4.4 �� gnuplot �Ǥϡ�PostScript ��ޤ��괰���� %
-UTF-8 �Υ��ݡ��Ȥ��ʤ���Ƥ��ޤ���
+�����¿���ν��Ϸ�����ư��ޤ�����
+������ PostScript �ǤϤȤƤ����Ǥ���
 
 
 %%% \subsection{Can I do 1:1 scaling of axes?}
@@ -1631,38 +1570,36 @@ UTF-8 
 %%% \subsection{Can I put different text sizes into my plots?}
 \subsection{�ۤʤ륵�����Υƥ����Ȥ��ĤΥ���դǽ��ϤǤ��ޤ���}
 
-%%% Some terminals can, others can't. Some allow you to choose 
-%%% a font size for the
-%%% entire plot. Terminals supporting the "enhanced text" mode 
-%%% allow you to change fonts and text sizes within a plot. Look at
-%%% the help for these terminals.
-��ǽ�ʽ��Ϸ����⤢��ޤ����������Ǥʤ���Τ⤢��ޤ���
-�������ΤΥե���ȥ�����������Ǥ���褦�ʤ�Τ⤢��ޤ���
-"enhanced text" �⡼�ɤ򥵥ݡ��Ȥ��Ƥ�����Ϸ����Ǥ�
-������ǥƥ����ȥ������ȥե���Ȥ��ѹ����Ԥʤ��ޤ���
-���줾��ν��Ϸ����Υإ�פ򻲾Ȥ��Ƥ���������
-
+%%% Most terminal types allow you to specify a starting font face and size.
+%%% The "enhanced text" mode allows you to change fonts, text sizes, bold and
+%%% italic styles within a plot.
+�����Ƥ��ν��Ϸ����Ǥϡ��ǥե���ȥե���Ȥ�̾���ȥ����������Ǥ��ޤ���
+�ֳ�ĥʸ�������ץ⡼�� ("enhanced text") �Ǥϡ��ե���ȡ�
+�����ʸ����������ܡ���ɡ�������å��ν��Τ��ĤΥ�������
+�ѹ��Ǥ��ޤ���
 
 %%% \subsection{How do I skip data points?}
 \subsection{�ɤ�������ǡ������򥹥��åפǤ��ޤ���}
 
-%%% By specifying \texttt{?} as a data value, as in
-�ʲ��Τ褦�˥ǡ����ͤȤ��� \texttt{?} ����ꤹ��ФǤ��ޤ���
+%%% By specifying \textit{?} as a data value, as in
+�ʲ��Τ褦�˥ǡ����ͤȤ��� \textit{?} ����ꤹ��ФǤ��ޤ���
 %% end Japanese
+\small
 \begin{verbatim}
         1 2
         2 3
         3 ?
         4 5
 \end{verbatim}
+\normalsize
 
-%%% See also \texttt{set missing}.
-%%% See also \texttt{set datafile commentschars} for specifying comment 
+%%% See also \textit{set missing}.
+%%% See also \textit{set datafile commentschars} for specifying comment 
 %%% characters in
 %%% data files.
-\texttt{set missing} �⻲�Ȥ��Ƥ���������
+\textit{set missing} �⻲�Ȥ��Ƥ���������
 �ǡ����ե�����Υ�����ʸ������ꤹ��ˤϡ�
-\texttt{set datafile commentschars} �򻲾Ȥ��Ƥ���������
+\textit{set datafile commentschars} �򻲾Ȥ��Ƥ���������
 
 
 %%% \subsection{How do I plot every nth point?}
@@ -1674,7 +1611,7 @@ UTF-8 
 %%% then try \verb+plot 'a.dat' with linespoints pointinterval n+.
 ����ϡ��㤨�� \verb+plot 'a.dat' every 2+ �Τ褦�ˡ�
 \verb+plot+ ���ޥ�ɤ˿����ʥ��ץ�������ꤹ�뤳�ȤǤǤ��ޤ���
-���٤Ƥ������̤�������������������ε���� n ����˽񤭤������ϡ�
+���٤Ƥ������̤�������������������ε���� n ����˽񤭤������ϡ�\\
 \verb+plot 'a.dat' with linespoints pointinterval n+ �Ȥ��ƤߤƤ���������
 
 
@@ -1688,11 +1625,9 @@ UTF-8 
 %%% \item \verb+set arrow .... .... nohead+ where you have to compute
 %%% explicitly the start and the end of the arrow.
 %%% \item generate (inlined) datapoints and plot them
-%%% \item switch to parametric mode
 \item \verb+set arrow .... .... nohead+  ���ξ�硢
 ������Τʳ������Ƚ�λ���ΰ��֤�׻����Ƥ���ɬ�פ�����ޤ��� 
 \item �ǡ��������ä� (����饤��Ǥλ�����) ���������
-\item �ѥ�᡼���⡼�ɤˤ���
 %% end Japanese
 \end{itemize}
 
@@ -1700,23 +1635,23 @@ UTF-8 
 %%% \subsection{How do I plot data files}
 \subsection{�ɤ�������ǡ����ե����������Ǥ��ޤ���}
 
-%%% Easily: by a command \texttt{plot 'a.dat'}. In 3D, use 
-%%% \texttt{splot 'a.dat'} --
+%%% Easily: by a command \textit{plot 'a.dat'}. In 3D, use 
+%%% \textit{splot 'a.dat'} --
 %%% but don't forget to put a blank line in between two subsequent 
 %%% scans (isolines),
 %%% otherwise you will get an error that the data is not gridded; 
 %%% see also question 
 %%% \ref{blank1}. If your data are not gridded, then use 
-%%% \texttt{set dgrid3d \{many
+%%% \textit{set dgrid3d \{many
 %%% options\}}.
-��ñ�Ǥ������ޥ�� \texttt{plot 'a.dat'} �ǤǤ��ޤ���
-3 ��������ξ��� \texttt{splot 'a.dat'} �Ǥ���
+��ñ�Ǥ������ޥ�� \textit{plot 'a.dat'} �ǤǤ��ޤ���
+3 ��������ξ��� \textit{splot 'a.dat'} �Ǥ���
 ��������2 �ĤΤĤʤ��äƤ����� (��Ω��) ��ʬΥ����Τ�
 ���Ԥ���Ϥ���Τ�˺��ʤ��Ǥ���������
 ����ʤ��ȡ��ǡ������ʻҾ� (grid) �Ǥʤ��Ȥ������顼���Ф뤫���Τ�ޤ���
 ���� \ref{blank1} �⻲�Ȥ��Ƥ���������
 �ǡ������ʻҾ��Ǥʤ����ϡ�
-\texttt{set dgrid3d \{����ʥ��ץ����\}} ����Ѥ��Ƥ���������
+\textit{set dgrid3d \{����ʥ��ץ����\}} ����Ѥ��Ƥ���������
 
 
 %%% \subsection{How do I replot multiplot drawing}
@@ -1838,42 +1773,16 @@ gnuplot 
 %%% them?}
 \subsection{�ɤ��ɲä��ĥ���ʤ���Ƥ��ޤ���������Ϥɤ����������ޤ���}
 
-%%% Many extensions or patches are available on the "Patches" page of the
+%%% Extensions or patches are available on the "Patches" page of the
 %%% gnuplot development site
 %%% \http{sourceforge.net/tracker/?group_id=2055&atid=302055}.
-%%% The current development version will generally include some of these
-%%% being debugged for inclusion in a later official release of gnuplot.
-��������γ�ĥ��ѥå�����gnuplot �γ�ȯ������ %
+%%% The current development version will generally include features that are
+%%% not yet part of the most recent official release of gnuplot.
+��ĥ��ѥå��ϡ�gnuplot �γ�ȯ������ %
 \http{sourceforge.net/tracker/?group_id=2055&atid=302055} %
 �� "Patches" �ڡ����ˤ���ޤ���
-�ǿ��γ�ȯ�Ǥϡ�
-gnuplot �κ����������꡼���˴ޤޤ��뤿��ΥǥХå��򤷤ʤ��顢
-�������������Τ����Ĥ���ޤ�Ǥ����ޤ���
-
-%%% Older extensions, which may or may not work with the current version,
-%%% are available from \ftp{ftp.ucc.ie}{/pub/gnuplot/contrib/}.
-���ߤ��ǤǤ�ư�����ɤ���ʬ����ޤ��󤬡�
-�Ť���ĥ�� \ftp{ftp.ucc.ie}{/pub/gnuplot/contrib/} �ˤ���ޤ� %
-(����: ���� (03/14 2005) �Ϥ����ˤϤʤ��褦�Ǥ�)��
-
-%%% Some extensions available:
-���߰ʲ��Τ褦�ʳ�ĥ���ʤ���Ƥ��ޤ�:
-%% end Japanese
-\begin{itemize}
-%%% \item \texttt{date-errorbar}: allows dates in the hi/lo fields for 
-%%% errorbars.
-%%% \item \texttt{perltk}: A perl/tk canvas widget.
-%%% \item \texttt{Gnuplot.py}: A python package to create graphs from
-%%% within python. More information at
-%%% \http{gnuplot-py.sourceforge.net}.
-\item \texttt{date-errorbar}: ���顼�С��ξ岼�ξ������եǡ�����Ȥ���
-\item \texttt{perltk}: perl/tk �����Х��ѥ��������å�
-\item \texttt{Gnuplot.py}: Python ��ǥ���դ��������뤿��� %
-Python �ѥå��������ܤ����ϰʲ��򻲾�:
-\http{gnuplot-py.sourceforge.net}.
-%% end Japanese
-\end{itemize}
-
+����Ū�ˡ����ߤγ�ȯ�Ǥϡ��ǽ�������꡼���Ǥ� gnuplot �ˤ�
+�ޤ����äƤ��ʤ���ǽ�����äƤ��ޤ���
 
 %%% \subsection{I need an integration, fft, iir-filter,...!}
 \subsection{��ʬ�� FFT �� IIR �ե��륿�ʤɤ��ߤ����ΤǤ���}
@@ -1881,49 +1790,45 @@ Python 
 %%% \Gnuplot{} has been and is a plotting program, not a data
 %%% processing or mathematical program suite. Therefore \gnuplot{}
 %%% can't do that. Look into the demo file "bivariat.dem" for a basic
-%%% implementation of an integration.
+%%% implementation of an integration.  However \gnuplot{} version 5 does
+%%% support calling functions from a dynamically loaded external shared
+%%% object, i.e. a plugin.  So if you want to code up some complicated
+%%% function in C or another language with compatible calling conventions,
+%%% you can compile it into a plugin for \gnuplot{} to import.
 \gnuplot{} �Ϻ��ޤǤ⡢�����Ƹ��ߤ�����ץ����Ǥ��ꡢ�ǡ����������
 �����ץ����ǤϤ���ޤ��󡣤�äƤ��Τ褦�ʤ��ȤϤǤ��ޤ�����ʬ��
 ����Ū�ʼ����ˤĤ��Ƥ� demo �� "bivariat.dem" �򸫤Ƥ���������
-
-%%% For more sophisticated data-processing read the next section.
-�����ʥǡ��������ˤĤ��Ƥϼ��Υ����������ɤ�Ǥ���������
-
+��������\gnuplot{} �С������ 5 �ϡ�ưŪ����ͭ���֥������Ȥδؿ��
+�ƤӽФ���������֥ץ饰����פ򥵥ݡ��Ȥ��Ƥ��ޤ���
+��äơ�C ���뤤��¾�θ���ˤ��ʣ���ʴؿ��
+����줿�ƤӽФ��ͼ��˽��äƽ񤱤С�
+\gnuplot{} ������ݡ��ȤǤ���ץ饰����Ȥʤ�褦
+����ѥ��뤹�뤳�Ȥ��Ǥ��ޤ���
 
 %%% \subsection{Can I do heavy-duty data processing with \gnuplot? or
 %%% What is beyond \gnuplot?}
 \subsection{"heavy-duty" �ǡ����� \gnuplot{} �ǻȤ��ޤ�����
 �ޤ��� \gnuplot{} ���Ѥ���ΤϤʤ��Ǥ���}
 
-%%% \gnuplot{} alone is not suited very well for this. One thing you might try
-%%% is \texttt{fudgit}, an interactive multi-purpose fitting program written by
-%%% Martin-D. Lacasse. It can use \gnuplot{} as its graphics back end.
-\gnuplot{} ñ�ȤǤϤ��ޤꤽ��ˤ�Ŭ���Ƥ��ޤ���
-\texttt{fudgit} ���Ƥߤ�Ȥ����Ǥ��礦������� Martin-D.Lacasse �ˤ�ä�
-�񤫤줿���÷�¿��Ū�������ƤϤ�ץ����Ǥ���
-������ظ�ǥ���ե��å����ϤΤ���� \gnuplot{} ���Ѥ��ޤ���
+%%% \gnuplot{} by itself is not suited very well for heavy 
+%%% numerical computation. 
+%%% On the other hand it can handle very large data sets.
+\gnuplot{} ���켫�Ȥϡ�����ɤ����ͷ׻��ˤϤ��ޤ�����Ƥ��ޤ���
+�����������ʤ��礭�ʥǡ�������ν����ϲ�ǽ�Ǥ���
 
-%%% Michael Courtney has written a program called lsqrft, which uses the
-%%% Levenberg-Marquardt - algorithm for fitting data to a function. It is
-%%% available from
-%%% \ftp{hobbes.nmsu.edu}{/pub/os2/apps/analysis/lsqrft15.zip};
-%%% sources, which should compile on Unix, and executables for MS-DOS and
-%%% OS/2 are available.  There is an interface to the OS/2 presentation
-%%% manager.
-Michael Courtney �� lsqrft �ȸƤФ��ץ�����񤭤ޤ�����
-����ϥǡ�����ؿ�����ƤϤ��Τ� Levenberg-Marquardt %
-���르�ꥺ�����Ѥ��ޤ���
-Unix �ǥ���ѥ����ǽ�ʥ������������� MS-DOS, OS/2 �Ѥμ¹ԥХ��ʥ�� %
-\ftp{hobbes.nmsu.edu}{/pub/os2/apps/analysis/lsqrft15.zip} �ˤ���ޤ���
-OS/2 �ץ쥼��ơ������ޥ͡�������Ф��륤�󥿡��ե������⤢��ޤ���
+%%% One thing you might try is \textit{fudgit}, an interactive multi-purpose
+%%% fitting program written by Martin-D. Lacasse.
+%%% It can use \gnuplot{} as its graphics back end.
+Martin-D. Lacasse ���񤤤������÷���¿��Ū�����󵢥ץ���� %
+\textit{fudgit} ���ƤߤƤ���������
+����ϡ�����ս����Ѥ������ \gnuplot{} ��Ȥ��ޤ���
 
 %%% You might also want to look at the applications developed by
 %%% the Software Tools Group (STG) at the National Center for
-%%% Supercomputing Applications. Ftp to ftp.ncsa.uiuc.edu
-%%% and get the file README.BROCHURE for more information.
-NCSA (National Center for Supercomputing Applications) �� STG 
-(Software Tools Group) �ˤ�äƳ�ȯ���줿���ץꥱ������󤬸�������С�
-�ܺ٤� ftp.ncsa.uiuc.edu �� ftp ���ơ�README.BROCHURE ��������Ƥ���������
+%%% Supercomputing Applications \http{ncsa.uiuc.edu}.
+NCSA (National Center for Supercomputing Applications)
+�� STG (Software Tools Group) �ˤ�äƳ�ȯ���줿���ץꥱ�������
+�⤢��ޤ�: \http{ncsa.uiuc.edu}��
 
 %%% You can also try pgperl, an integration of the PGPLOT plotting
 %%% package with Perl 5. Information can be found at
@@ -1954,74 +1859,25 @@ Octave 
 �Ȥ���ǡ�octave �� \gnuplot{} �����襨�󥸥�Ȥ��ƻȤ��ޤ��Τǡ�
 \gnuplot{} ���ɲä���ǡ��������ץ�����������뤳�Ȥˤʤ�ޤ���
 
-%%% Finally, there is \texttt{scilab} at \http{www.scilab.org}
-%%% doing about the same as matlab. It is free but copyrighted software.
-�Ǹ�ˡ�\texttt{scilab} �� \http{www.scilab.org} �ˤ���ޤ���
-����� matlab �Ȥۤ�Ʊ�ͤ�ư��ޤ���
-�����ե꡼�Ǥ����������������Ƥ��ʤ� (GPL �ǤϤʤ�) ���եȥ������Ǥ���
-
-
-%%% \subsection{Mouse in my interactive terminal does not work}
-\subsection{������÷������ߥʥ�Ǥϥޥ����������ޤ���}
-
-%%% If your mouse is not working, try to hit 'm' in the interactive terminal to
-%%% switch mousing on/off. See below for the list of supported interactive
-%%% terminals.
-�ޥ����������ʤ���硢�������÷������ߥʥ�� 'm' ���ǤäƤߤƤ���������
-����ϥޥ�����ǽ�� On/Off ��Ԥʤ��ޤ���
-���ݡ��Ȥ��Ƥ������÷������ߥʥ�ΰ����ˤĤ��Ƥϰʲ��򻲾Ȥ��Ƥ���������
-
-%%% If it still does not run, then either gnuplot has not been configured or
-%%% compiled with mouse support, or you have not properly installed it, 
-%%% or running
-%%% an older version of gnuplot (check your \texttt{PATH}).
-����Ǥ�ޤ�ư��ʤ���硢
-gnuplot ���ޥ�����ǽ�򥵥ݡ��Ȥ���褦�� configure ����ʤ��ä���
-����ѥ��뤵��ʤ��ä�����
-�����ȥ��󥹥ȡ��뤷�ʤ��ä�����
-���뤤�� gnuplot �θŤ��С�������ȤäƤ��뤫 %
-(���ʤ��� \texttt{PATH} ������å����ƤߤƤ�������) �Ǥ��礦��
-
-%%% If your gnuplot is running as the plotting engine of Octave under X11, then
-%%% please put \texttt{set mouse} into your \texttt{\$HOME/.gnuplot} (preferred
-%%% than putting \texttt{gset mouse} into \texttt{\$HOME/.octaverc}). This is
-%%% needed only for gnuplot 4.0: according to its \texttt{help x11\_mouse},
-%%% gnuplot 4.0 under x11 running through a pipe needs \texttt{set mouse} to be
-%%% executed before launching the x11 plot window.
-gnuplot �� X11 ��� Octave �����襨�󥸥�Ȥ���ư��Ƥ�����ϡ�
-���ʤ��� \texttt{\$HOME/.gnuplot} ����� %
-\texttt{set mouse} ������Ƥ������� %
-(\texttt{\$HOME/.octaverc} ����� \texttt{gset mouse} %
-�Ȥ����ꤤ���Ǥ��礦)��
-�ʲ��� gnuplot 4.0 �ˤΤߴؤ��뤳�ȤǤ��������� \texttt{help x11\_mouse} %
-�ˤ��С�x11 ��ǥѥ��פ��̤��� gnuplot ����ư���Ƥ������ %
-x11 ���襦����ɥ�����ư�������� \texttt{set mouse} %
-��¹Ԥ���ɬ�פ�����褦�Ǥ���
+%%% Finally there is \textit{scilab} (\http{www.scilab.org}), an open source
+%%% alternative to \textit{matlab}.
+�Ǹ�ˡ�\textit{matlab} ������Ȥ��ơ������ץ󥽡����� \textit{scilab} %
+(\http{www.scilab.org}) �⤢��ޤ���
 
 %%% \subsection{How to use hotkeys in my interactive terminals}
 \subsection{������÷������ߥʥ�ǤɤΤ褦�˥ۥåȥ�����Ȥ��Ф����Ǥ���}
 
-%%% There are several hotkeys available in interactive terminals.
-%%% Currently the following interactive terminals support hotkeys and mousing:
-%%% OS/2 Presentation Manager, X11, Windows, WX, and GGI. Hit 'h' 
-%%% in the terminal
-%%% to get list of hotkeys. 
-���÷������ߥʥ�ǤϤ����Ĥ��Υۥåȥ�����ͭ���ˤʤäƤ��ޤ���
-���ߤϼ������÷������ߥʥ뤬�ۥåȥ����ȥޥ�����ǽ�򥵥ݡ��Ȥ��Ƥ��ޤ�:
-OS/2 �ץ쥼��ơ������ޥ͡����� (pm), X11, Windows, WX, GGI��
-'h' �򤽤Υ����ߥʥ������ǤĤȡ��ۥåȥ����ΰ�����ɽ������ޤ���
-%% end Japanese
-%%% See \texttt{help new-features} or the \textbf{Features introduced 
-%%% in version 4.0} 
-%%% section in the docs for a brief guide over mousing and hotkeys. 
-%%% Further, you may read \texttt{help mouse} and \texttt{help bind} for more
-%%% information.
-�ޥ�����ǽ��ۥåȥ����˴ؤ��복�פϡ�
-\texttt{help new-features} ��ɥ�����Ȥ� %
-\textbf{Features introduced in version 4.0} ���������򻲾Ȥ��Ƥ���������
-����ˡ�
-\texttt{help mouse} �� \texttt{help bind} ��������������Ǥ��礦��
-
+%%% Most of the interactive terminals support both pre-defined and user-defined
+%%% hotkeys to replot, toggle plot elements, change axis scaling, and so on.
+%%% Hit \textit{h} in an active gnuplot plot window to get list of hotkeys. 
+%%% Read \textit{help mouse} and \textit{help bind} for more information.
+�ۤȤ�ɤ����÷����Ϸ����Ǥϡ������衢�����Ǥ�����Υȥ��롢
+���Υ���������ѹ��ʤɤ�Ԥ�����ˡ����餫�������ꤵ�줿��
+����ӥ桼�������ǽ�ʥۥåȥ�����ξ���򥵥ݡ��Ȥ��Ƥ��ޤ���
+����ͭ���� gnuplot �����襦����ɥ���� \textit{h} ���ǤĤȡ�
+�ۥåȥ����ΰ�����ɽ������ޤ���
+����ʤ����ˤĤ��Ƥϡ�\textit{help mouse} �� \textit{help bind} ��
+���Ȥ��Ƥ���������
 
 %%% \subsection{I have ported \gnuplot{} to another system, or patched it. What
 %%% do I do?}
@@ -2076,34 +1932,28 @@ OS/2 
 %%% \subsection{How do I plot two functions in non-overlapping regions?}
 \subsection{�ɤ������� 2 �Ĥδؿ��Ťʤ�ʤ��褦�˽񤱤ޤ���}
 
-%%% Use a parametric plot. An example:
-�ѥ�᡼�� (parametric) ���Ѥ������褹��Ф����Ǥ��礦����: 
-%% end Japanese
-\begin{verbatim}
-gnuplot> set parametric
-gnuplot> a=1
-gnuplot> b=3
-gnuplot> c=2
-gnuplot> d=4
-gnuplot> x1(t) = a+(b-a)*t
-gnuplot> x2(t) = c+(d-c)*t
-gnuplot> f1(x) = sin(x)
-gnuplot> f2(x) = x**2/8
-gnuplot> plot [t=0:1] x1(t),f1(x1(t)) title "f1", x2(t), f2(x2(t)) title "f2"
-\end{verbatim}
-
-%%% You can also use \gnuplot's ability to ignore mathematically undefined
-%%% expressions: the expression \verb+1/0+ is silently ignored, thus a
-%%% construction like
-\gnuplot{} �Ρ����Ū���������ʤ�����̵�뤹�뵡ǽ��Ȥ����Ȥ�Ǥ��ޤ���
-\verb+1/0+ �Ȥ��������ۤä�̵�뤷�ޤ��Τǡ��㤨��
+%%% This used to be complicated.  In version 5 it is easy - place the
+%%% desired range immediately before each function being plotted.
+%%% For example, to plot experimental data and two different functional
+%%% models f1 and f2 covering two different portions of the domain:
+����ϡ�������ʣ���Ǥ��������С������ 5 �ǤϤ���ϴ�ñ�Ǥ���
+���褹��ƴؿ��ľ����ɬ�פ��ϰϤ��֤��ޤ���
+�㤨�С��¸��ǡ����ȡ��ΰ�� 2 �Ĥΰۤʤ���ʬ�򥫥С�����
+�ۤʤ� 2 �Ĥΰۤʤ�ؿ��ǥ� f1, f2 �����褹��ˤ�:
 %% end Japanese
+%%% \small
+%%% \begin{verbatim}
+%%% gnuplot> set autoscale x  # get x range from the data
+%%% gnuplot> plot "data", [-100:0] f1(x), [0:100] f2(x)
+%%% \end{verbatim}
+%%% \normalsize
+%% begin Japanese
+%%% \small
 \begin{verbatim}
-gnuplot> set xran [-10:10]
-gnuplot> plot (abs(x)>0.5?1/0: x**2)
+gnuplot> set autoscale x  # x ���ϰϤ�ǡ����������
+gnuplot> plot "data", [-100:0] f1(x), [0:100] f2(x)
 \end{verbatim}
-%%% plots a quadratic function only for \verb+|x| < 0.5+.
-�Τ褦�ˤ���� 2 ��δؿ�� \verb+|x| < 0.5+ ���ϰϤǤΤ����褷�ޤ���
+\normalsize
 
 
 %%% \subsection{How do I run my data through a filter before plotting?}
@@ -2116,10 +1966,12 @@ gnuplot> plot (abs(x)>0.5?1/0: x**2)
 ¾�Υץ����ν��Ϥ�ȤäƼ¹Ԥ��뤳�Ȥ���ǽ�Ǥ���
 �㤨�С����Τ褦�� awk ��û���ץ���ब�Ȥ��ޤ�:
 
+\small
 \begin{verbatim}
 gnuplot> plot "< awk ' { print $1, $3/$2 } ' file.in"
 \end{verbatim}
 %$
+\normalsize
 
 %%% The plot command is very powerful and is able to do some
 %%% arithmetic on datafiles. See \verb+help plot+.
@@ -2128,45 +1980,15 @@ plot 
 \verb+help plot+ �򻲾Ȥ��Ƥ���������
 
 %%% The above filtering works seamlessly under Unixes and OS/2. On Windows, this
-%%% is only supported by the console version \texttt{gnuplot} or the GUI version
-%%% \texttt{wgnuplot\_pipes}, which has an additional text console attached. The 
-%%% Cygwin version of gnuplot naturally supports pipes as well. 
-��Υե��륿�ϡ�Unix �䤽�θߴ� OS��OS/2 �Ǥϥ��ࡼ����ư��ޤ���
-Windows �Ǥϡ�����ϥ��󥽡����Ǥ� \texttt{gnuplot} ����
-�ƥ����ȥ��󥽡��뤬�ɲä��줿 GUI �Ǥ� \texttt{wgnuplot\_pipes} %
-�Τߤ����ݡ��Ȥ��ޤ���
-Cygwin �Ǥ� gnuplot �⡢�ѥ��פ��������ݡ��Ȥ��Ƥ��ޤ���
-
-%%% \subsection{How do I make it easier to use \gnuplot{} with \LaTeX{}?}
-\subsection{�ɤ������� \gnuplot{} �β�����ڤ� \LaTeX{} �ǰ����ޤ���}
-
-%%% There is a set of \LaTeX{} macros and shell scripts that are meant
-%%% to make your life easier when using \gnuplot{} with \LaTeX{}. This
-%%% package can be found on \ftp{ftp.dartmouth.edu}{pub/gnuplot/latex.shar},
-%%% by David Kotz.
-%%% For example, the program "plotskel" can turn a gnuplot-output
-%%% file plot.tex into a skeleton file skel.tex, that has the same
-%%% size as the original plot but contains no graph. With the right
-%%% macros, the skeleton can be used for preliminary \LaTeX{} passes,
-%%% reserving the full graph for later passes, saving tremendous
-%%% amounts of time.
-\LaTeX{} �ȤȤ�� \gnuplot{} ��Ȥ���硢
-�����ڤˤ��Ƥ����褦�� %
-\LaTeX{} �Υޥ���ȥ����륹����ץȤΥ��åȤ�����ޤ���
-���Υѥå������� David Kotz �ˤ���Τǡ�
-\ftp{ftp.dartmouth.edu}{pub/gnuplot/latex.shar} �ˤ���ޤ���
-(����: ���� (03/14 2005) �Ϥ����ˤϤʤ��褦�Ǥ���
-archie �� gnuplot-latex.shar �Ȥ����ե������õ���ƤߤƤ�������) %
-�㤨�� "plotskel" �� \gnuplot{} �ν��Ϥ���ե����� plot.tex %
-������ȤߤΥե����� skel.tex ���������ޤ���
-����ϸ��Υ���դ�Ʊ���������Ǥ���������������ʬ������ޤ���
-���ι��Ȥߤ�Ŭ�ڤʥޥ���ȶ��� \LaTeX{} ����ѥ���Υƥ��ȤǻȤ����Ȥ��Ǥ���
-����ϸ�˹Ԥʤ�����դ�����ȴޤ������ѥ���ν�������Ω����
-���襳��ѥ���ˤ�����¿���λ��֤����󤷤Ƥ���ޤ���
-
-
-%%% \subsection{How do I save and restore my settings?}
-\subsection{�ɤ��������������¸/�����ѤǤ��ޤ���}
+%% is only supported by default in \textit{gnuplot} version 5, but required a 
+%% separate program \textit{wgnuplot\_pipes} in some earlier versions.
+��Υե��륿�ϡ�Unix �䤽�θߴ� OS��OS/2 �Ǥ�����ʤ�ư��ޤ���
+Windows �Ǥϡ�����ϥǥե���ȤǤ� \textit{gnuplot} �С������ 5 �Τߤ�
+���ݡ��Ȥ��ޤ������������ΥС������Ǥϡ��̤Υץ���� %
+\textit{wgnuplot\_pipes} ��ɬ�פˤʤ�ޤ���
+
+%%% \subsection{How do I save and restore my current settings?}
+\subsection{�ɤ������鸽�ߤ��������¸/�����ѤǤ��ޤ���}
 
 %%% Use the \verb+save+ and \verb+load+ commands for this; see \verb+help save+
 %%% and \verb+help load+ for details.
@@ -2174,8 +1996,8 @@ archie 
 �ܺ٤�\verb+help save+ ��\verb+help load+ �򻲾Ȥ��Ƥ���������
 
 %%% You can save the current terminal and restore it later without touching the
-%%% filesystem by \texttt{set term push} and \texttt{set term pop}, respectively.
-\texttt{set term push} �� \texttt{set term pop} ��Ȥ��С�
+%%% filesystem by \textit{set term push} and \textit{set term pop}, respectively.
+\textit{set term push} �� \textit{set term pop} ��Ȥ��С�
 �ե����륷���ƥ�򿨤뤳�Ȥʤ�
 ���줾�츽�ߤν��Ϸ�������¸�Ȥ��θ���������Ǥ��ޤ���
 
@@ -2183,17 +2005,18 @@ archie 
 %%% \subsection{How do I plot lines (not grids) using splot?}
 \subsection{�ɤ������� splot �Ƕ��� (�ʻҤǤʤ�) ��񤱤ޤ���}
 
-%%% If the data in a data file for splot is arranged in such a way
-%%% that each one has the same number of data points (using blank
-%%% lines as delimiters, as usual), splot will plot the data with a
-%%% grid. If you want to plot just lines, use a different number of
-%%% data entries (you can do this by doubling the last data point,
-%%% for example).
-splot �Υǡ����ե�����Υǡ������������Ʊ����Υǡ���������Ĥ褦�� %
-(���ڤ�Ϥ��Ĥ�Τ褦�˶��Ԥ�) ·�����Ƥ����硢
-splot �ϥǡ�����ʻҤ����褷�ޤ���
-ñ�˶��������ǽ񤭤����ʤ�С��ǡ�������ȥ�θĿ��ۤʤ�褦�� %
-(�㤨�кǸ��������Ʊ����Τ� 2 �ĤĤ���Ȥ�) ���Ƥ���������
+%%% If the data input to splot is arranged such that each line contains
+%%% the same number of data points (using blank lines as delimiters, as usual),
+%%% splot will by default treat the data as describing a surface.
+%%% If you want to draw individual lines instead, try some combination of
+%%% \textit{unset surface}, \textit{set surface explicit}, 
+%%% \textit{plot ... nosurface}.
+splot �ؤ����ϥǡ��������ƹԤ�Ʊ���ǡ������� (�̾�϶��Ԥ�ʬΥ����Ƥ���) %
+����Ĥ褦��·�äƤ���С�splot �ϥǥե���ȤǤϤ��Υǡ�����
+���̤򵭽Ҥ����ΤȤ��ư����ޤ���
+�����Ǥʤ��ġ��ζ��������褷������С�
+\textit{unset surface}, \textit{set surface explicit}, 
+\textit{plot ... nosurface} �ʤɤ��Ȥ߹�碌�ƤߤƤ���������
 
 
 %%% \subsection{How do I plot a function f(x,y) that is bounded by other
@@ -2201,9 +2024,10 @@ splot 
 \subsection{�ɤ������� x-y ʿ�̾��¾�δؿ�����¤���Ƥ��� f(x,y) ��
           ����դ�񤱤ޤ���}
 
-%%% An example:
-��:
+%%% Here is one way:
+�ʲ��ϰ�Ĥ���ˡ�Ǥ�:
 %% end Japanese
+\small
 \begin{verbatim}
 gnuplot> f(x,y) = x**2 + y **2
 gnuplot> x(u) = 3*u
@@ -2214,23 +2038,7 @@ gnuplot> set cont
 gnuplot> splot [0:1] [0:1] u,yl(x(u))+(yu(x(u)) - yl(x(u)))*v,\
 > f(x(u), (yu(x(u)) - yl(x(u)))*v)
 \end{verbatim}
-
-
-%%% \subsection{How do I turn off <feature> in a plot?}
-\subsection{�ɤ�����������������̵���ˤǤ��ޤ���}
-
-%%% Most gnuplot features are controlled by a corresponding set/unset command.
-%%% If a feature is enabled by default, or by using \verb+set <feature>+, 
-%%% then you
-%%% should be able to turn it by using \verb+set no<feature>+. However, 
-%%% the preferred 
-%%% syntax since version 4.0 is \verb+unset <feature>+.
-�����Ƥ��� gnuplot �ε�ǽ�ϡ��б����� set/unset ���ޥ�ɤ�����Ǥ��ޤ���
-�ǥե���Ȥ�ͭ���ˤʤäƤ��뵡ǽ��
-���뤤�� \verb+set <feature>+ ��ͭ���ˤ�����ǽ�ϡ�
-����� \verb+set no<feature>+ ��̵���ˤǤ��ޤ���
-������version 4.0 ����Ϥ��ν񼰤Ϥष�� \verb+unset <feature>+ %
-�Ȥ��٤��Ǥ���
+\normalsize
 
 
 %%% \subsection{How do I call \gnuplot{} from my own programs?}
@@ -2244,15 +2052,15 @@ unix 
 ̾���Ĥ��ѥ��פ��ɤ߽Ф����Ȥ��Ǥ��ޤ���
 %% end Japanese
 %%% On Windows, due to the lacking standard input (stdin) in GUI programs,
-%%% you either need to use the console version \texttt{gnuplot} (recommended),
-%%% or use \texttt{wgnuplot\_pipes}, which has an additional console window
-%%% attached. The old helper program \texttt{pgnuplot} is still included
+%%% you either need to use the console version \textit{gnuplot} (recommended),
+%%% or use \textit{wgnuplot\_pipes}, which has an additional console window
+%%% attached. The old helper program \textit{pgnuplot} is still included
 %%% in the distribution package.
 Windows �Ǥϡ�GUI �ץ�����ɸ������ (stdin) ���Ȥ��ʤ����ᡢ
-���󥽡����Ǥ� \texttt{gnuplot} (�侩) ����
-�ƥ����ȥ��󥽡��뤬�ɲä��줿 GUI �Ǥ� \texttt{wgnuplot\_pipes} %
+���󥽡����Ǥ� \textit{gnuplot} (�侩) ����
+�ƥ����ȥ��󥽡��뤬�ɲä��줿 GUI �Ǥ� \textit{wgnuplot\_pipes} %
 �Τ����줫��Ȥ�ɬ�פ�����ޤ���
-�Ť� \texttt{pgnuplot} �Ȥ����إ�ѡ��ץ�����
+�Ť� \textit{pgnuplot} �Ȥ����إ�ѡ��ץ�����
 �ޤ����եå������˴ޤޤ�Ƥ��ޤ���
 
 
@@ -2340,27 +2148,32 @@ Planck 
 �����ȥ�����Τ�Τ���Ϥ���������ʤ��Ǥ��礦�� %
 (multiplot �Υڡ�����¾�Υ���դ˽Ťͤ�褦��):
 
+\small
 \begin{verbatim}
 reset; unset xtics; unset ytics
 unset border; unset key
 set title 'Title on an empty page'
 plot [][0:1] 2
 \end{verbatim}
+\normalsize
 
 
-%%% \subsection{How do I produce graph of an exact border size?}
+%%% \subsection{How do I give exact positions for the graph borders 
+%%% on the page?}
 \subsection{�����ΰ��֤����٤�����˹�碌�ƥ���դ���ˤ�}
 
 %%% Specify the position of the top, bottom, left, and right borders in
 %%% terms of their fractional position within the page:
 �塢�����������ζ������֤򡢥ڡ�����ΰ��֤Ȥ��ƾ���ñ�̤ǻ��ꤷ�Ƥ�������:
 
+\small
 \begin{verbatim}
 set lmargin at screen 0.05
 set bmargin at screen 0.05
 set rmargin at screen 0.95
 set tmargin at screen 0.95
 \end{verbatim}
+\normalsize
 
 
 %%% \section{Common problems}
@@ -2396,14 +2209,16 @@ gnuplot 
 ����ϴĶ��ѿ� GDFONTPATH ��Ϳ������ǥ��쥯�ȥ���˥ե���Ȥ�õ���ޤ���
 ���Τ褦�� libgd �Υե���ȥѥ������ꤹ��ȡ�
 ���٤� gnuplot �Υǥե���ȥե���Ȥ����ꤷ�������⤷��ޤ���
-��: \verb+setenv GNUPLOT_DEFAULT_GDFONT verdana+
+��: \\
+\verb+setenv GNUPLOT_DEFAULT_GDFONT verdana+
 %% end Japanese
 %%% \item [{pdf}] The libpdf support library should have come with an associated
 %%% font configuration file, usually installed as /usr/local/share/pdflib.upr.
 %%% The environmental variable PDFLIBRESOURCE should point to this file.
 \item [{pdf}] 
 ���Υ��ݡ��ȥ饤�֥�� libpdf �ϡ���Ϣ����ե��������ե�����򻲾Ȥ��ޤ���
-�̾綠��� /usr/local/share/pdflib.upr �Ȥ��ƥ��󥹥ȡ��뤵��ޤ���
+�̾綠��� \\
+/usr/local/share/pdflib.upr �Ȥ��ƥ��󥹥ȡ��뤵��ޤ���
 �Ķ��ѿ� PDFLIBRESOURCE �ϡ����Υե�����ΰ��֤򼨤��ޤ���
 %% end Japanese
 %%% \item [{post}] PostScript font names are not resolved until the document
@@ -2431,61 +2246,71 @@ x11 
 ���������ȥ�å������������ꡢ�ޥ���Х��ȥե���Ȥ���Ѥ��뤿��ˤϡ�
 ����Ū�˰ʲ��Τ褦�˻��ꤹ��ɬ�פ�����ޤ�:
 %% end Japanese
+\small
 \begin{verbatim}
 set term x11 font "mbfont:sazanami mincho,vera,20"
 \end{verbatim}
+\normalsize
 %%% \item [{win}] Select "Choose font..." from the "Options" pull-down menu 
 %%% in the toolbar.
 \item [{win}] 
 �ġ���С��� "Options" �Υץ�������˥塼���� "Choose font..." �����򤷤ޤ���
 %% end Japanese
-%%% \item [{wxt}] On linux systems, the wxt terminal can find fonts indexed
-%%% by the fontconfig utility.
-\item [{wxt}] 
-Linux �����ƥ�Ǥϡ�wxt ���Ϸ����� fontconfig �Ǵ�������Ƥ���ե���Ȥ�
-���Ĥ��뤳�Ȥ��Ǥ��ޤ���
+%%% \item [{wxt, qt}] On linux systems these terminals rely on fonts provided
+%%% by the system's \textit{fontconfig} utility.
+\item [{wxt, qt}] 
+Linux �����ƥ�Ǥϡ������ν��Ϸ����ϥ����ƥ�� fontconfig �桼�ƥ���ƥ���
+�󶡤���ե���Ȥ���Ѥ��ޤ���
 %% end Japanese
 \end{description}
 
-%%% \subsection{\Gnuplot{} is not plotting any points under X11! How come?}
-\subsection{X11 �� \gnuplot{} ���ɤ���������褷�ޤ��󡣤ɤ������餤���Ǥ���}
+%%% \subsection{\Gnuplot{} does not open a plot windoe for x11 or qt. Why?}
+\subsection{x11 �ޤ��� qt �� \gnuplot{} �����襦����ɥ��򳫤��ޤ��󡣤ʤ��Ǥ���}
 %% end Japanese
-%%%%
-%%%%Very probably, you still are using an old version of
-%%%%gnuplot\_x11. Remove that, then do a full installation.
-%%%%
 %%% On VMS, you need to make several symbols:
 VMS ��ǤϤ����Ĥ��ε������ʤ���Ф����ޤ���:
 
+\small
 \begin{verbatim}
         $ gnuplot_x11 :== $disk:[directory]gnuplot_x11
         $ gnuplot :== $disk:[directory]gnuplot.exe
         $ def/job GNUPLOT$HELP disk:[directory]gnuplot.hlb
 \end{verbatim}
+\normalsize
 
 %%% Then run \gnuplot{} from your command line, and use
 %%% \verb+set term x11+.
 ������ \gnuplot{} �򥳥ޥ�ɥ饤�󤫤鵯ư����
 \verb+set term x11+ �Ȥ��Ƥ���������
 
-%%% If you run \gnuplot{} on Unix systems, be sure that the newest
-%%% \verb+gnuplot_x11+ is the first in your search path.
-%%% Command \verb+which gnuplot_x11+ will help you.
-Unix ��� \gnuplot{} ��ư�������ϡ�
-�ǿ��� \verb+gnuplot_x11+ �������ѥ��κǽ�˸����Ƥ��뤫��ǧ���Ƥ���������
-���ޥ�� \verb+which gnuplot_x11+ �����ͤˤʤ�Ǥ��礦��
+%%% On Unix systems the x11 and qt terminals require installation of
+%%% separate helper programs \textit{gnuplot\_x11} and \textit{gnuplot\_qt}.
+%%% These are usually installed in a directory 
+%%% \textit{/usr/libexec/gnuplot/5.0/}
+%%% and \gnuplot{} knows to look for them there.  
+%%% If they are installed somewhere
+%%% else or gnuplot is having trouble finding them, 
+%%% try setting the environmental
+%%% variable \verb+GNUPLOT_DRIVER_DIR+.
+Unix ��Ǥϡ�x11 �� qt ���Ϸ����ϡ�ʬΥ���줿�إ�ѡ��ץ���� %
+\textit{gnuplot\_x11}, \textit{gnuplot\_qt} �Υ��󥹥ȡ��뤬ɬ�פǤ���
+�������̾�� \textit{/usr/libexec/gnuplot/5.0/} �Ȥ����ǥ��쥯�ȥ��
+���󥹥ȡ��뤵�졢\gnuplot{} �Ϥ��ξ���õ�����Ȥ��ΤäƤ��ޤ���
+������������ʳ��ξ��˥��󥹥ȡ��뤷���ꡢ
+�����򸫤Ĥ���ݤ����꤬��������ϡ�
+�Ķ��ѿ� \verb+GNUPLOT_DRIVER_DIR+ �����ꤷ�ƤߤƤ���������
 
 
 %%% \subsection{Why does \gnuplot{} ignore my very small numbers?}
 \subsection{�ʤ� \gnuplot{} �ϤȤƤ⾮��������Υǡ�����̵�뤹��ΤǤ���}
 
 
-%%% \Gnuplot{} treats all numbers less than 1e-08 as zero, by default.
+%%% For some purposes \Gnuplot{} treats numbers less than 1e-08 as being zero.
 %%% Thus, if you are trying to plot a collection of very small
 %%% numbers, they may be plotted as zero. Worse, if you're plotting
 %%% on a log scale, they will be off scale. Or, if the whole set of
 %%% numbers is "zero", your range may be considered empty:
-\gnuplot{} �ϥǥե���ȤǤ� 1e-08 ��꾮�������Ƥο�� 0 �Ȥ��ư����ޤ���
+\gnuplot{} �ϡ�������Ū�Τ��� 1e-08 ��꾮������� 0 �Ȥ��ư����ޤ���
 ��äƤȤƤ⾮������ν��ޤ�����褷�褦�Ȥ����
 ������ 0 �Ȥ������褵��Ƥ��ޤ��ޤ���
 �п������褹����ϡ�
@@ -2493,7 +2318,7 @@ Unix 
 �ޤ������Ƥο� "0" �Ǥ����硢
 �ϰϤ϶��Ǥ���Ȥߤʤ���ޤ� (����: \gnuplot{} 3.6 �����λ���):
 
-
+\small
 \begin{verbatim}
 gnuplot> plot 'test1'
 Warning: empty y range [4.047e-19:3e-11], adjusting to [-1:1]
@@ -2502,62 +2327,51 @@ gnuplot> plot 'test1'
               ^
 y range is less than `zero`
 \end{verbatim}
+\normalsize
 
 %%% The solution is to change \gnuplot's idea of "zero":
 �����к��� \gnuplot{} �� "zero" �γ�ǰ���ѹ����뤳�ȤǤ���
 %% end Japanese
+\small
 \begin{verbatim}
 gnuplot> set zero 1e-20
 \end{verbatim}
+\normalsize
 
 %%% For more information, type \verb+help set zero+.
 ���ܤ�������ˤĤ��Ƥ� \verb+help set zero+ �򻲾Ȥ��Ƥ���������
 
 
-%%% \subsection{\Gnuplot{} is not plotting on the screen when run from command
-%%%     line via '\texttt{gnuplot filename.gp}'}
-\subsection{���ޥ�ɥ饤�󤫤� '\texttt{gnuplot filename.gp}' �Ȥ��Ƥ�
-    ����ɽ�����Ƥ���ޤ���}
-
-%%% Obviously, it draws (unless there is an error in the script file), 
-%%% but the plot
-%%% dissappears immediately when the script is completed. 
-����Ϥ����������Ƥ����Ǥ��� %
-(������ץȥե�����˥��顼���ʤ����)��
-������ץȤ���λ�����Ȥ������褬�����˾ä��Ƥ��롢
-�Ȥ������Ȥ�����Ǥ���
+%%% \subsection{When I run \gnuplot{} from the shell or a script, 
+%%%     the resulting plot flashes by on the screen and then disappears}
+\subsection{������䥹����ץȤ��� \gnuplot{} ��¹Ԥ��Ƥ�
+   ��̤Υ���դϥ����꡼���ǰ�ֽФ�����Ǥ��Τ��ȽФƤ��ޤ���}
 
-%%% Solution 1: Put a \verb+pause -1+ after the plot command in the file, 
-%%% or at the
-%%% file end.
-�� 1: �ե�����Ρ�plot ���ޥ�ɤβ��� pause -1 ���ɲä��Ƥ���������
+%%% \begin{enumerate}
+%%% \item Put a \verb+pause -1+ after the plot command in the file, 
+%%%    or at the file end.
+\begin{enumerate}
+\item �ե�������� plot ���ޥ�ɤθ塢�ޤ��ϥե�����κǸ�� %
+   \verb+pause -1+ ���������ˡ������ޤ���
 
-%%% Solution 2: Use command \verb+gnuplot filename.gp -+ (yes, dash is the last
+%%% \item Use command \verb+gnuplot filename.gp -+ (yes, dash is the last
 %%% parameter) to stay in the interactive regime when the script completes.
-�� 2: \verb+gnuplot filename.gp -+ 
-(���������å����Ǹ�ΰ���ˤ��ޤ�) ��ȤäƤ���������
-����ˤ�ꡢ������ץȤ���λ���������÷��⡼�ɤ˰ܹԤ��ޤ���
-
-%%% Solution 3A: On an X-Window System system, you can also use the 
-%%% \verb+-persist+
-%%% option, the X11 window is then not closed. Close the X11 window by typing "q"
-%%% when the focus is on it.
-�� 3A: X-Window System �ʤ�С�
-gnuplot �� \verb+-persist+ ���ץ�����Ȥ����Ȥ�Ǥ��ޤ���
-���ξ�硢X11 �����襦����ɥ��ϳ������ޤޤˤʤ�ޤ���
-���Υ�����ɥ����Ĥ���ˤϤ��ξ�˥ե�����������äƹԤä� %
-"q" �򥿥��פ��Ƥ���������
-
-%%% Solution 3B: On M\$ Windows, you can also use either \verb+-persist+ or
-%%% \verb+/noend+.
-�� 3B: M\$ Windows �Ǥϡ�\verb+-persist+ ���ץ����
-���뤤�� \verb+/noend+ ���ץ���󤬻Ȥ��ޤ���
-
-%%% Solution 4: For OS/2 PM terminal, use \verb+set term pm persist+ or
-%%% \verb+set term pm server+. For X11 terminal, use \verb+set term x11 persist+.
-�� 4: OS/2 PM ���Ϸ����Ǥϡ�\verb+set term pm persist+��
-�ޤ��� \verb+set term pm server+ ����Ѥ��Ƥ���������
-X11 ���Ϸ����Ǥ� \verb+set term x11 persist+ �Ȥ��ƤߤƤ���������
+\item ������ץȤν�λ�������÷���ʬ�ˤ���褦�ˤ���ˤ� %
+\verb+gnuplot filename.gp -+ (�Ǹ�Υѥ�᡼���ϥޥ��ʥ�) ����Ѥ��ޤ���
+
+%%% \item Run \gnuplot{} as \textit{gnuplot -persist}
+\item \gnuplot{} �� \textit{gnuplot -persist} �ȼ¹Ԥ�����ˡ������ޤ���
+
+%%% \item On Windows you can also use either \verb+-persist+ or \verb+/noend+.
+\item Windows ��ʤ顢\verb+-persist+ �� \verb+/noend+ �Τɤ���Ǥ�
+  �빽�Ǥ���
+
+%%% \item Give the \textit{persist} option as part of the 
+%%% \textit{set terminal} command.
+\item ���ޥ�� \textit{set terminal} �ΰ���ʬ�Ȥ���
+  ���ץ���� \textit{persist} ��Ϳ���Ƥ�빽�Ǥ���
+%% end Japanese
+\end{enumerate}
 
 
 %%% \subsection{My formulas (like 1/3) are giving me nonsense results! 
@@ -2574,12 +2388,14 @@ X11 
 ��:
 
 
+\small
 \begin{verbatim}
 gnuplot> print 1/3
                 0
 gnuplot> print 1./3.
                 0.333333
 \end{verbatim}
+\normalsize
 
 %%% This way of evaluating integer expressions is shared by both C and Fortran.
 ����μ��򤳤Τ褦�ˤ���ɾ������������ %
@@ -2644,6 +2460,7 @@ C 
 %%% following:
 ���Τ褦��û�� Perl ������ץȤ�Ȥä� \gnuplot{} ��ƤӽФ��ޤ�:
 %% end Japanese
+\small
 \begin{verbatim}
 #!/usr/local/bin/perl -w
 open (GP, "|/usr/local/bin/gnuplot -persist") or die "no gnuplot";
@@ -2653,6 +2470,7 @@ GP->autoflush(1);
 print GP,"set term x11;plot '/tmp/data.dat' with lines\n";
 close GP
 \end{verbatim}
+\normalsize
 
 %%% \Gnuplot{} closes its plot window on exit. The \verb+close GP+
 %%% command is executed, and the plot window is closed even before you have
@@ -2687,11 +2505,11 @@ Thomas Koenig, David Kotz, Ed Kubaitis, Russell Lang, Alexander Lehmann,
 Alexander Mai, Carsten Steger, Tom Tkacik, Jos Van der Woude, James R.
 %%% Van Zandt, and Alex Woo.  Additional substantial contributors to version 4.0
 %%% include Ethan Merritt, Petr Mikul\'{\i}k and Johannes Zellner.
-%%% Version 4.2, 4.4 and 4.6 releases was coordinated by Ethan Merritt.
+%%% Version 4.2, 4.4, 4.6 and 5.0 releases were coordinated by Ethan Merritt.
 Van Zandt, Alex Woo �Ǥ���
 ����� version 4.0 �ؤν��פʴ�Ϳ�ԤȤ��ơ�
 include Ethan Merritt, Petr Mikul\'{\i}k, Johannes Zellner �����ޤ���
-version 4.2, 4.4, 4.6 �Υ�꡼���� Ethan Merritt �����ޤȤ�ޤ�����
+version 4.2, 4.4, 4.6, 5.0 �Υ�꡼���� Ethan Merritt �����ޤȤ�ޤ�����
 
 %%% This list was initially compiled by John Fletcher with contributions
 %%% from Russell Lang, John Campbell, David Kotz, Rob Cunningham, Daniel
@@ -2722,8 +2540,12 @@ Petr Mikul\'{\i}k 
 \gnuplot{} 4.2 �Ѥν����ϡ�
 Petr Mikul\'{\i}k �� Ethan Merritt �ˤ��Ԥʤ��ޤ�����
 %% end Japanese
-%%% Revised for \gnuplot{} 4.4 release by Ethan Merritt.
-\gnuplot{} 4.4 �Ѥν����ϡ�
+%%% Revised for \gnuplot{} 4.4 and 4.6 releases by Ethan Merritt.
+\gnuplot{} 4.4 �� 4.6 �Ѥν����ϡ�
+Ethan Merritt �ˤ��Ԥʤ��ޤ�����
+%% end Japanese
+%%% Revised for \gnuplot{} 5.0 by Ethan Merritt.
+\gnuplot{} 5.0 �Ѥν����ϡ�
 Ethan Merritt �ˤ��Ԥʤ��ޤ�����
 
 %%% 
diff --git a/docs/gnuplot.doc b/docs/gnuplot.doc
index 9a13f55..730e631 100644
--- a/docs/gnuplot.doc
+++ b/docs/gnuplot.doc
@@ -1,4 +1,4 @@
-C RCS $Id: gnuplot.doc,v 1.902.2.5 2014/08/25 20:46:19 sfeam Exp $
+C RCS $Id: gnuplot.doc,v 1.902.2.20 2014/11/08 04:52:24 sfeam Exp $
 C
 C Copyright (C) 1986 - 1993, 1998, 1999, 2000, 2001, 2004   Thomas Williams, Colin Kelley et al.
 C
@@ -203,7 +203,7 @@ C
  * Interactive terminals support hypertext labels that only appear when the
  mouse hovers over the label's anchor point.
 
- * New coordinate system (Degrees, Minutes, Seconds). See `set xdata geographic`.
+ * New coordinate system (Degrees, Minutes, Seconds). See `set xtics geographic`.
 
  * The default format for axis labels is "% h" ("$%h$" for LaTeX terminals).
  This format is like the C standard format %g except that the exponential term,
@@ -283,9 +283,11 @@ C
  millisecond precision.
 
  * The function `timecolumn(N,"timeformat")` now has 2 parameters. Because the
- required second parameter is not associated with any particular data axis, this
+ new second parameter is not associated with any particular data axis, this
  allows using the `timecolumn` function to read time data for reasons other than
- specifying the x or y coordinate.
+ specifying the x or y coordinate.  This functionality replaces the command
+ sequence `set xdata time; set timefmt "timeformat"`.  It allows combining time
+ data read from multiple files with different formats within a single plot.
 
  * The `reverse` keyword of the `set [axis]range` command affects only
  autoscaling. It does not invert or otherwise alter the meaning of a command
@@ -1467,16 +1469,12 @@ C marker below is used to signal this to doc2html:
  This can be used to import external functions into gnuplot scripts using
  'f(x) = real(system(sprintf("somecommand %f", x)))'.
 4 word
-?expressions functions word
-?word
 =word
 #word("string",n) & string, int & returns the nth word in "string" \\
 %word("string",n)@string, int at returns the nth word in "string"
  `word("string",n)` returns the nth word in string. For example,
  `word("one two three",2)` returns the string "two".
 4 words
-?expressions functions words
-?words
 =words
 #words("string") & string & returns the number of words in "string" \\
 %words("string")@string at returns the number of words in "string"
@@ -1674,6 +1672,32 @@ C marker below is used to signal this to doc2html:
  string that does not correspond to a currently defined variable,
  value() returns NaN.
 
+4 Counting and extracting words
+?expressions functions word
+?expressions functions words
+?words
+?word
+ `word("string",n)` returns the nth word in string. For example,
+ `word("one two three",2)` returns the string "two".
+
+ `words("string")` returns the number of words in string. For example,
+ `words(" a b c d")` returns 4.
+
+ The `word` and `words` functions provide limited support for quoted strings, 
+ both single and double quotes can be used:
+       print words("\"double quotes\" or 'single quotes'")   # 3
+ A starting quote must either be preceeded by a white space, or start the 
+ string. This means that apostrophes in the middle or at the end of words are 
+ considered as parts of the respective word:
+       print words("Alexis' phone doesn't work") # 4
+ Escaping quote characters is not supported. If you want to keep certain quotes,
+ the respective section must be surrounded by the other kind of quotes:
+       s = "Keep \"'single quotes'\" or '\"double quotes\"'"
+       print word(s, 2) # 'single quotes'
+       print word(s, 4) # "double quotes"
+ Note, that in this last example the escaped quotes are necessary only for the 
+ string definition.
+
 3 Operators
 ?expressions operators
 ?operators
@@ -2307,7 +2331,7 @@ Ffigure_newsyntax
 
  Syntax:
 
-       ... {linecolor | lc} {<colorspec> | <n>}
+       ... {linecolor | lc} {"colorname" | <colorspec> | <n>}
        ... {textcolor | tc} {<colorspec> | {linetype | lt} <n>}
 
  where <colorspec> has one of the following forms:
@@ -2432,7 +2456,7 @@ Ffigure_newsyntax
                            # dot (.) hyphen (-) underscore(_) and space.
        dashtype (s1,e1,s2,e2,s3,e3,s4,e4)  # dash pattern specified by 1 to 4
                            # numerical pairs <solid length>, <emptyspace length> 
- 
+
  Example:
        # Two functions using linetype 1 but distinguished by dashtype
        plot f1(x) with lines lt 1 dt solid, f2(x) with lines lt 1 dt 3
@@ -2936,12 +2960,13 @@ Ffigure_newsyntax
  etc.
 
  Internally all times and dates are converted to the number of seconds from
- the year 1970.  The command `set timefmt` defines the format for all inputs:
- data files, ranges, tics, label positions---in short, anything that accepts a
- data value must receive it in this format.  Since only one input format can
- be in force at a given time, all time/date quantities being input at the same
- time must be presented in the same format.  Thus if both x and y data in a
- file are time/date, they must be in the same format.
+ the year 1970.  The command `set timefmt` defines the default format for all
+ inputs: data files, ranges, tics, label positions -- anything that accepts a
+ time data value defaults to receiving it in this format.  Only one default
+ format can be in effect at a given time. Thus if both x and y data in a file
+ are time/date, by default they are interpreted in the same format. However
+ this default can be replaced when reading any particular file or column of
+ input using the `timecolumn` function in the corresponding `using` specifier.
 
  The conversion to and from seconds assumes Universal Time (which is the same
  as Greenwich Standard Time).  There is no provision for changing the time
@@ -2952,12 +2977,12 @@ Ffigure_newsyntax
 
  Commands like `show xrange` will re-interpret the integer according to
  `timefmt`.  If you change `timefmt`, and then `show` the quantity again, it
- will be displayed in the new `timefmt`.  For that matter, if you give the
- deactivation command (like `set xdata`), the quantity will be shown in its
- numerical form.
+ will be displayed in the new `timefmt`.  For that matter, if you reset the
+ data type flag for that axis (e.g. `set xdata`), the quantity will be shown
+ in its numerical form.
 
  The commands `set format` or `set tics format` define the format that will be
- used for tic labels, whether or not the specified axis is time/date.
+ used for tic labels, whether or not input for the specified axis is time/date.
 
  If time/date information is to be plotted from a file, the `using` option
  _must_ be used on the `plot` or `splot` command.  These commands simply use
@@ -3890,7 +3915,7 @@ Ffigure_points
  1 or 2 columns of basic input data are required in 2D plots; 1 or 3 columns are
  required in 3D plots.  See `style lines`.  Additional input columns may be used
  to provide information such as variable point size or variable point color.
- 
+
  The first 8 point types are shared by all terminals.  Individual terminals may
  provide a much larger number of distinct point types.  Use the `test` command
  to show what is provided by the current terminal.  Alternatively any single
@@ -4335,17 +4360,22 @@ Ffigure_mapcontours
 ?fit
 ?least-squares
 ?Marquardt
- The `fit` command fits a user-supplied expression to a set of data points (x,z)
- or (x,y,z) or (x1, x2, x3, ..., xN, z), using the nonlinear least-squares
- Marquardt-Levenberg algorithm.  The dummy parameters x1, ..., xN must be
- assigned names either using the `set dummy` command or using an in-line range
- specifier in the `fit` command.  The expression must evaluate to a real number.
- The parameters to be varied during fitting are specified by the keyword `via`.
+ The `fit` command fits a user-supplied real-valued expression to a set of
+ data points, using the nonlinear least-squares Marquardt-Levenberg
+ algorithm. There can be up to 12 independent variables, there is always 1
+ dependent variable, and any number of parameters can be fitted.
+ Optionally, error estimates can be input for weighting the data points.
+
+ The basic use of `fit` is best explained by a simple example:
+
+       f(x) = a + b*x + c*x**2
+       fit f(x) 'measured.dat' using 1:2 via a,b,c
+       plot 'measured.dat' u 1:2, f(x)
 
  Syntax:
        fit {<ranges>} <expression>
            '<datafile>' {datafile-modifiers}
-           {noerrors | zerror | xerror | yerror | xyerror}
+           {{unitweights} | {y|xy|z}error | errors <var1>{,<var2>,...}}
            via '<parameter file>' | <var1>{,<var2>,...}
 
  Ranges may be specified to filter the data used in fitting.
@@ -4354,48 +4384,79 @@ Ffigure_mapcontours
  analogous to `plot`; see `plot ranges`.
 
  <expression> can be any valid `gnuplot` expression, although the most common is
- a previously user-defined function of the form f(x) or f(x,y).
+ a previously user-defined function of the form f(x) or f(x,y). It must be 
+ real-valued.
+ The names of the independent variables are set by the `set dummy` command,
+ or in the <ranges> part of the command (see below); by default, the first
+ two are called x and y.
+ Furthermore, the expression should depend on one or more variables whose
+ value is to be determined by the fitting procedure.
 
  <datafile> is treated as in the `plot` command.  All the `plot datafile`
  modifiers (`using`, `every`,...) except `smooth` are applicable to `fit`.
  See `plot datafile`.
 
- The function being fit may have up to 12 independent variables (more if
- specially configured).  In the absence of a `using` specification, the fit
- implicitly assumes there is only a single independent variable:
-
-       z                           # 1 independent variable (line number)
-       x:z                         # 1 independent variable (1st column)
-
- The interpretation of additional columns in the using spec is as follows:
-
-       z:s                         # 1 independent variable (line number)
-       x:z{:s}                     # 1 independent variable
-       x:y:z{:s}                   # 2 independent variables
-       x1:x2:x3:z{:s}              # 3 independent variables
-       x1:x2:x3:...:xN:z{:s}       # N independent variables
-
- If specified using the `errors` or `zerrors` keyword, the last column `s` is
- interpreted as the standard deviation of the corresponding z value and is
- used to compute a weight for the datum, 1/s**2.  Otherwise, all data points
- are weighted equally, with a weight of one.  Note that if you do not specify
- `using` specs at all, no z errors are read from the datafile even if it does
- have a third column.
-
- Since the number of using specifiers is ambiguous, you need to specify which
- columns correspond to errors using the `error` keyword. `noerror` means that
- no errors `s` are supplied.  `zerror` is an alias for `errors z` and you may
- use the alias `yerror` in the following common case where we denote the
- dependent variable with y instead of z:
-
-       x:y:s     yerror    (similar to `plot` with `yerrorbars`)
-
- Note that for compatibility reasons with `gnuplot` versions prior to 5.0,
- the `error` keyword is not required.  If you do not specify the error columns
- explicitly, there must be two more `using` qualifiers (z and s) than there are
- independent variables, unless there is only one variable.  `gnuplot` then uses
- the following formats, depending on the number of columns given in the `using`
- specifcation:
+ The datafile contents can be interpreted flexibly by providing a `using`
+ qualifier as with plot commands. For example to generate the independent
+ variable x as the sum of columns 2 and 3, while taking z from column 6 and 
+ requesting equal weights:
+
+       fit ... using ($2+$3):6
+
+ In the absence of a `using` specification, the fit implicitly assumes
+ there is only a single independent variable. If the file itself, or the
+ using specification, contains only a single column of data, the line
+ number is taken as the independent variable.
+ If a `using` specification is given, there can be up to 12 independent
+ variables (and more if specially configured at compile time). 
+
+ The `unitweights` option, which is the default, causes all data points to be
+ weighted equally. This can be changed by using the `errors` keyword to read
+ error estimates of one or more of the variables from the data file. These
+ error estimates are interpreted as the standard deviation s of the
+ corresponding variable value and used to compute a weight for the datum as
+ 1/s**2.
+
+ In case of error estimates of the independent variables, these weights are
+ further multiplied by fitting function derivatives according to the 
+ "effective variance method" (Jay Orear, Am. J. Phys., Vol. 50, 1982).
+
+ The `errors` keyword is to be followed by a comma-separated list of one or
+ more variable names for which errors are to be input; the dependent variable
+ z must always be among them, while independent variables are optional.
+ For each variable in this list, an additional column will be read from the
+ file, containing that variable's error estimate. Again, flexible
+ interpretation is possible by providing the `using` qualifier.
+ Note that the number of independent variables is thus implicitly given by the
+ total number of columns in the `using` qualifier, minus 1 (for the dependent
+ variable), minus the number of variables in the `errors` qualifier.
+
+ As an example, if one has 2 independent variables, and errors for the
+ first independent variable and the dependent variable, one uses
+ the `errors x,z` qualifier, and a `using` qualifier with 5 columns,
+ which are interpreted as x:y:z:sx:sz (where x and y are the independent
+ variables, z the dependent variable, and sx and sz the standard
+ deviations of x and z).
+
+ A few shorthands for the `errors` qualifier are available:
+ `yerrors` (for fits with 1 column of independent variable), and
+ `zerrors` (for the general case) are all equivalent to `errors z`,
+ indicating that there is a single extra column with errors of the
+ dependent variable.
+
+ `xyerrors`, for the case of 1 independent variable, indicates that there
+ are two extra columns, with errors of both the independent and the
+ dependent variable.  In this case the errors on x and y are treated by
+ Orear's effective variance method.
+
+ Note that `yerror` and `xyerror` are similar in both form and interpretation
+ to the `yerrorlines` and `xyerrorlines` 2D plot styles.
+
+ With the command `set fit v4` the fit command syntax is compatible with
+ `gnuplot` version 4 and before.  Then there must be two more `using`
+ qualifiers (z and s) than there are independent variables, unless there is
+ only one variable.  `gnuplot` then uses the following formats, depending on
+ the number of columns given in the `using` specification:
 
        z                           # 1 independent variable (line number)
        x:z                         # 1 independent variable (1st column)
@@ -4404,18 +4465,9 @@ Ffigure_mapcontours
        x1:x2:x3:z:s                # 3 independent variables (5 columns total)
        x1:x2:x3:...:xN:z:s         # N independent variables (N+2 columns total)
 
- Please beware that this means that you always have to supply z-errors s in a
- fit with two independent variables x, y if you do not specify the `{no}error`
- keyword.  There must be two more `using` qualifiers (z and s) than there are
- independent variables, unless there is only one independent variable.
-
-
- The datafile contents can be interpreted flexibly by providing a `using`
- qualifier as with plot commands. For example to generate the independent
- variable x as the sum of columns 2 and 3, while taking z from column 6 and 
- requesting unit weights:
-
-       fit ... noerrors using ($2+$3):6
+ Please beware that this means that you have to supply z-errors s in a fit with
+ two or more independent variables. If you want unit weights you need to supply
+ them explicitly by using e.g. then format x:y:z:(1).
 
  The dummy variable names may be changed when specifying a range as noted above.
  The first range corresponds to the first `using` spec, and so on.  A range may
@@ -4437,16 +4489,16 @@ Ffigure_mapcontours
        fit f(x) 'measured.dat' via 'start.par'
        fit f(x) 'measured.dat' using 3:($7-5) via 'start.par'
        fit f(x) './data/trash.dat' using 1:2:3 yerror via a, b, c
-       fit g(x,y) 'surface.dat' using 1:2:3 noerror via a, b, c
+       fit g(x,y) 'surface.dat' using 1:2:3 via a, b, c
        fit a0 + a1*x/(1 + a2*x/(1 + a3*x)) 'measured.dat' via a0,a1,a2,a3
-       fit a*x + b*y 'surface.dat' using 1:2:3 noerror via a,b
-       fit [*:*][yaks=*:*] a*x+b*yaks 'surface.dat' u 1:2:3 noerror via a,b
+       fit a*x + b*y 'surface.dat' using 1:2:3 via a,b
+       fit [*:*][yaks=*:*] a*x+b*yaks 'surface.dat' u 1:2:3 via a,b
 
-       fit [][][t=*:*] a*x + b*y + c*t 'foo.dat' using 1:2:3:4 noerror via a,b,c
+       fit [][][t=*:*] a*x + b*y + c*t 'foo.dat' using 1:2:3:4 via a,b,c
 
        set dummy x1, x2, x3, x4, x5
        h(x1,x2,x3,x4,s5) = a*x1 + b*x2 + c*x3 + d*x4 + e*x5
-       fit h(x1,x2,x3,x4,x5) 'foo.dat' using 1:2:3:4:5:6 noerror via a,b,c,d,e
+       fit h(x1,x2,x3,x4,x5) 'foo.dat' using 1:2:3:4:5:6 via a,b,c,d,e
 
  After each iteration step, detailed information about the current state
  of the fit is written to the display.  The same information about the
@@ -7113,9 +7165,6 @@ Ffigure_mapcontours
  corresponding `unset` command.  See also the `reset` command, which returns
  all settable parameters to default values.
 
- If a variable contains time/date data, `show` will display it according to
- the format currently defined by `set timefmt`, even if that was not in effect
- when the variable was initially defined.
 =iteration
  The `set` and `unset` commands may optionally contain an iteration clause.
  See `plot for`.
@@ -7920,7 +7969,7 @@ Ffigure_mapcontours
  color to a particular linetype or linestyle. To see the list of known color
  names, use the command `show colornames`.   Example:
 
-       set style line 1 linecolor rgb "sea-green"
+       set style line 1 linecolor "sea-green"
 3 contour
 ?commands set contour
 ?commands unset contour
@@ -8422,6 +8471,8 @@ Ffigure_missing
 ?set fit errorvariables
 ?set fit logfile
 ?set fit script
+?set fit v4
+?set fit v5
  The `set fit` command controls the options for the `fit` command.
 
  Syntax:
@@ -8437,6 +8488,7 @@ Ffigure_missing
                {start-lambda <value>|default}
                {lambda-factor <value>|default}
                {script {"<command>"|default}}
+               {v4 | v5}
        unset fit
        show fit
 
@@ -8508,6 +8560,10 @@ Ffigure_missing
  the name of the first parameter and combining the two parameter names by
  "_". For example given the parameters "a" and "b" the covariance variable is
  named "FIT_COV_a_b".
+
+ In version 5 the syntax of the fit command changed and it now defaults to
+ unitweights if no 'error' keyword is given.  The `v4` option restores the
+ default behavior of gnuplot version 4, see also `fit`.
 3 fontpath
 ?commands set fontpath
 ?commands show fontpath
@@ -8560,8 +8616,7 @@ Ffigure_missing
  or with the `set tics format` or individual `set {axis}tics format` commands.
 
  Syntax:
-       set format {<axes>} {"<format-string>"}
-       set format {<axes>} {'<format-string>'}
+       set format {<axes>} {"<format-string>"} {numeric|timedate|geographic}
        show format
 
  where <axes> is either `x`, `y`, `xy`, `x2`, `y2`, `z`, `cb` or nothing
@@ -8774,7 +8829,7 @@ Ffigure_missing
        %y           year, 0-68 for 2000-2068, 69-99 for 1969-1999
        %Y           year, 4-digit
 #\begin{tabular}{|cl|} \hline
-#\multicolumn{2}{|c|}{Tic-mark label Date/Time Format Specifiers}\\
+#\multicolumn{2}{|c|}{Date Specifiers}\\
 #\hline \hline
 #Format & Explanation \\ \hline
 #\verb@%a@ & abbreviated name of day of the week \\
@@ -8840,7 +8895,7 @@ Ffigure_missing
 ^  <col align="left">
 ^</colgroup>
 ^<thead>
-^<tr>    <th>Format</th>    <th>Explanation</th></tr>
+^<tr>    <th>Date Format</th>    <th>Explanation</th></tr>
 ^</thead>
 ^<tbody>
 ^<tr>    <td><tt>%a</tt></td>    <td>abbreviated name of day of the week</td></tr>
@@ -8871,23 +8926,80 @@ Ffigure_missing
 ^</tbody>
 ^</table>
 
- Except for the non-numerical formats, these may be preceded by a "0" ("zero",
- not "oh") to pad the field length with leading zeroes, and a positive digit,
- to define the minimum field width (which will be overridden if the specified
- width is not large enough to contain the number).  The %S format also accepts
- a precision specifier so that fractional seconds can be written.
- There is a 24-character limit to the length of the printed text;
- longer strings will be truncated.
+ Numerical formats may be preceded by a "0" ("zero") to pad the field with
+ leading zeroes, and preceded by a positive digit to define the minimum field
+ width.  The %S, and %t formats also accept a precision specifier so that
+ fractional hours/minutes/seconds can be written.
 
- Examples:
+ at start table - first is interactive cleartext form
+       Format       Explanation
+       %tH          +/- hours relative to time=0 (does not wrap at 24)
+       %tM          +/- minutes relative to time=0
+       %tS          +/- seconds associated with previous tH or tM field
+#\begin{tabular}{|cl|} \hline
+#\multicolumn{2}{|c|}{Time Specifiers}\\
+#\hline \hline
+#Format & Explanation \\ \hline
+#\verb@%tH@ & +/- hours relative to time=0 (does not wrap at 24) \\
+#\verb@%tM@ & +/- minutes relative to time=0 \\
+#\verb@%tS@ & +/- seconds associated with previous tH or tM field \\
+%c l .
+%Format at Explanation
+%_
+%%tH at +/- hours relative to time=0 (does not wrap at 24)
+%%tM at +/- minutes relative to time=0
+%%tS at +/- seconds associated with previous tH or tM field
+%_
+ at end table
 
- Suppose the text is "76/12/25 23:11:11".  Then
-       set format x                 # defaults to "12/25/76" \n "23:11"
+
+^<table align="center" border="1" rules="groups" frame="hsides" cellpadding="3">
+^<colgroup>
+^  <col align="center">
+^  <col align="left">
+^</colgroup>
+^<thead>
+^<tr>    <th>Time Format</th>    <th>Explanation</th></tr>
+^</thead>
+^<tbody>
+^<tr>    <td><tt>%tH</tt></td>    <td>+/- hours relative to time=0 (does not wrap at 24)</td></tr>
+^<tr>    <td><tt>%tM</tt></td>    <td>+/- minutes relative to time=0</td></tr>
+^<tr>    <td><tt>%tS</tt></td>    <td>+/- seconds associated with previous tH or tM field</td></tr>
+^</tbody>
+^</table>
+
+5 Examples
+?commands set format date_specifiers examples
+?commands set format time_specifiers examples
+?set format date_specifiers examples
+?set format time_specifiers examples
+?set date_specifiers examples
+?set time_specifiers examples
+?date_specifiers examples
+?time_specifiers examples
+
+ Examples of date format:
+
+ Suppose the x value in seconds corresponds a time slightly before midnight
+ on 25 Dec 1976. The text printed for a tic label at this position would be
+
+       set format x                 # defaults to "12/25/76 \n 23:11"
        set format x "%A, %d %b %Y"  # "Saturday, 25 Dec 1976"
        set format x "%r %D"         # "11:11:11 pm 12/25/76"
 
- Suppose the text is "98/07/06 05:04:03.123456".  Then
-       set format x "%1y/%2m/%3d %01H:%02M:%06.3S"  # "98/ 7/  6 5:04:03.123"
+ Examples of time format:
+
+ The date format specifiers encode a time in seconds as a clock time on a 
+ particular day.  So hours run only from 0-23, minutes from 0-59, and negative
+ values correspond to dates prior to the epoch (1-Jan-1970). In order to report
+ a time value in seconds as some number of hours/minutes/seconds relative to a
+ time 0, use time formats %tH %tM %tS.  To report a value of -3672.50 seconds
+
+       set format x                 # default date format "12/31/69 \n 22:58"
+       set format x "%tH:%tM:%tS"   # "-01:01:12"
+       set format x "%.2tH hours"   # "-1.02 hours"
+       set format x "%tM:%.2tS"     # "-61:12.50"
+
 3 function style
 ?set function style
  This form of the command is deprecated. Please see `set style function`.
@@ -9006,6 +9118,7 @@ Ffigure_missing
 
  As of gnuplot version 4.6, hidden3d also affects 3D plotting styles `points`,
  `labels`, `vectors`, and `impulses` even if no surface is present in the graph.
+ Unobscured portions of each vector are drawn as line segments (no arrowheads).
  Individual plots within the graph may be explicitly excluded from this
  processing by appending the extra option `nohidden3d` to the `with` specifier.
 
@@ -10742,7 +10855,7 @@ Ffigure_missing
        set pm3d at s depthorder border lw 0.2 lt black
        unset hidden3d
        unset surf
-       splot x*x+y*y linecolor rgb "blue"	# otherwise it would be black
+       splot x*x+y*y linecolor rgb "blue"   # otherwise it would be black
 
  NB: The deprecated option `set pm3d hidden3d N` is still accepted. It is 
  equivalent to `set pm3d border ls N`.
@@ -11472,12 +11585,12 @@ Ffigure_missing
  `<backangle>` is the angle (in degrees) the back branches make with the arrow
  (in the same direction as `<angle>`). It is ignored if the style is `nofilled`.
 
- Specifying `filled` produces filled arrow heads (if heads are used).
- Specifying `noborder` draws filled arrow heads but does not draw a line
- around the arrow head. This has two effects.  The arrow head is slightly
- smaller. The tip of the arrow head lies exactly on the endpoint of the vector.
- If the border is drawn, the tip extends beyond the endpoint by some fraction
- of the border linewidth.  Not all terminals support filled arrow heads.
+ Specifying `filled` produces filled arrow heads with a border line around the
+ arrow head.  Specifying `noborder` produces filled arrow heads with no border.
+ In this case the tip of the arrow head lies exactly on the endpoint of the
+ vector and the arrow head is slightly smaller overall. Dashed arrows should
+ always use `noborder`, since a dashed border is ugly.
+ Not all terminals support filled arrow heads.
 
  The line style may be selected from a user-defined list of line styles
  (see `set style line`) or may be defined here by providing values for
@@ -12103,7 +12216,7 @@ Ffigure_missing
                 {in | out} {front | back}
                 {{no}rotate {by <ang>}} {offset <offset> | nooffset}
                 {left | right | center | autojustify}
-                { format "formatstring" } { font "name{,<size>}" }
+                {format "formatstring"} {font "name{,<size>}"} {{no}enhanced}
                 { textcolor <colorspec> }
        set tics scale {default | <major> {,<minor>}}
        unset tics
@@ -12220,13 +12333,9 @@ Ffigure_missing
  It has no meaning unless the command `set *data time` is given also.
 
  Syntax:
-       set timefmt {<axis>} "<format string>"
+       set timefmt "<format string>"
        show timefmt
 
- The optional <axis> argument allows to specify different time input formats
- for individual axes.  If it is omitted, the format string is applied to all
- axes.
-
  The string argument tells `gnuplot` how to read timedata from the datafile.
  The valid formats are:
 
@@ -12569,7 +12678,7 @@ Ffigure_missing
  An analogous command acts on each of the other axes.
 
  Syntax:
-       set xdata {time | geographic}
+       set xdata time
        show xdata
 
  The same syntax applies to `ydata`, `zdata`, `x2data`, `y2data` and `cbdata`.
@@ -12577,49 +12686,32 @@ Ffigure_missing
  The `time` option signals that data represents a time/date in seconds.
  The current version of gnuplot stores time to a millisecond precision.
 
- The `geographic` option signals that data represents a geographical coordinate
- measured in degrees/minutes/seconds.
-
  If no option is specified, the data interpretation reverts to normal.
 4 time
 ?commands set xdata time
 ?set xdata time
  `set xdata time` indicates that the x coordinate is to be interpreted as a
- date or time to millisecond precision.
-
- See `set timefmt` to tell gnuplot how to read date or time data from a file.
- The time/date is converted to seconds from start of the century.  There is
- currently only one timefmt, which implies that all the time/date columns must
- conform to this format.  Specification of ranges should be supplied as quoted
- strings according to this format to avoid interpretation of the time/date as
- an expression.
-
- By default the function 'strftime' (type "man strftime" on unix to look it up)
- is used to label axis tickmarks.  `gnuplot` tries to figure out a reasonable
- format for this.  You can customize the label format using `set format x`.
+ date or time to millisecond precision. Equivalent commands exist for
+ `set ydata time` and so on.
+
+ Two separate formats control interpretation of time data.
+ Input data is read from a file using the `timefmt` for that axis.
+ See `set timefmt`. 
+ Use quoted strings in this same `timefmt` to specify the axis range.
+
+ Example:
+
+      set xdata time
+      set timefmt x "%d-%b-%Y"
+      set xrange ["01-Jan-2013" : "31-Dec-2014"]
+
+ For output, i.e. tick labels along that axis or coordinates output by mousing,
+ the function 'strftime' (type "man strftime" on unix to look it up) is used to
+ convert from the internal time in seconds to a string representation of a date.
+ `gnuplot` tries to figure out a reasonable format for this.  You can customize
+ the format using either `set format x` or `set xtics format`.
  See `time_specifiers` for a special set of time format specifiers.
  See also `time/date` for more information.
-4 geographic
-?commands set xdata geographic
-?set xdata geographic
-?geographic
- `set xdata geographic` indicates that the x coordinate is to be interpreted as
- a geographic coordinate measured in degrees.  Use `set format x` to establish
- how the coordinate appears as an axis tick label.  The format specifiers for
- geographic data are as follows:
-        %D                   = integer degrees
-        %<width.precision>d  = floating point degrees
-        %M                   = integer minutes
-        %<width.precision>m  = floating point minutes
-        %S                   = integer seconds
-        %<width.precision>s  = floating point seconds
-        %E                   = label with E/W instead of +/-
-        %N                   = label with N/S instead of +/-
- For example, the command `set format x "%Ddeg %5.2mmin %E"` will cause 
- x coordinate -1.51 to be labeled as `" 1deg 30.60min W"`.
-
- If no special format is provided, the coordinate will be reported as a decimal
- number of degrees.
 3 xdtics
 ?commands set xdtics
 ?commands unset xdtics
@@ -12873,7 +12965,8 @@ Ffigure_missing
                   | <incr>
                   | <start>, <incr> {,<end>}
                   | ({"<label>"} <pos> {<level>} {,{"<label>"}...) }
-                 { format "formatstring" } { font "name{,<size>}" }
+                 {format "formatstring"} {font "name{,<size>}"} {{no}enhanced}
+                 { numeric | timedate | geographic }
                  { rangelimited }
                  { textcolor <colorspec> }
        unset xtics
@@ -13014,30 +13107,66 @@ Ffigure_missing
 
  Minor (unlabeled) tics can be added automatically by the `set mxtics`
  command, or at explicit positions by the `set xtics ("" <pos> 1, ...)` form.
-4 xtics time_data
-?set xtics time_axis tics
-?xtics time_axis tics
-?time_axis tics
- In case of timeseries data, axis tic position values must be given as quoted
- dates or times according to the format `timefmt`. If the <start>, <incr>, <end>
- form is used, <start> and <end> must be given according to `timefmt`, but
- <incr> must be in seconds.  Times will be written out according to the format
- given on `set format`, however.
+4 xtics timedata
+?set xtics timedata
+?xtics timedata tics
+?timedata tics
+ Times and dates are stored internally as a number of seconds.
+
+ Input: Non-numeric time and date values are converted to seconds on input using
+ the format specifier in `timefmt`.  Axis positions and range limits also may be
+ given as quoted dates or times interpreted using `timefmt`.
+ If the <start>, <incr>, <end> form is used, <incr> must be in seconds.
+ Use of `timefmt` to interpret input data, range, and tic positions is triggered
+ by `set xdata time`.
+ 
+ Output: Axis tic labels are generated using a separate format specified either
+ by `set format` or `set xtics format`.  By default the usual numeric format
+ specifiers are expected (`set xtics numeric`).  Other options are geographic
+ coordinates (`set xtics geographic`), or times or dates (`set xtics time`).
+
+ Note: For backward compatibility with earlier gnuplot versions, the command
+ `set xdata time` will implicitly also act do `set xtics time`, and `set xdata`
+ or `unset xdata` will implicitly reset to `set xtics numeric`.  However you
+ can change this with a later call to `set xtics`.
 
  Examples:
-       set xdata time
-       set timefmt "%d/%m"
-       set xtics format "%b %d"
+       set xdata time           # controls interpretation of input data
+       set timefmt "%d/%m"      # format used to read input data
+       set xtics timedate       # controls interpretation of output format
+       set xtics format "%b %d" # format used for tic labels
        set xrange ["01/12":"06/12"]
        set xtics "01/12", 172800, "05/12"
 
        set xdata time
        set timefmt "%d/%m"
-       set xtics format "%b %d"
+       set xtics format "%b %d" time
        set xrange ["01/12":"06/12"]
        set xtics ("01/12", "" "03/12", "05/12")
  Both of these will produce tics "Dec 1", "Dec 3", and "Dec 5", but in the
  second example the tic at "Dec 3" will be unlabeled.
+4 geographic
+?commands set xtics geographic
+?set xtics geographic
+?geographic
+ `set xtics geographic` indicates that x-axis values are to be interpreted as
+ a geographic coordinate measured in degrees.  Use `set xtics format` or 
+ `set format x` to specify the appearance of the axis tick labels.
+ The format specifiers for geographic data are as follows:
+        %D                   = integer degrees
+        %<width.precision>d  = floating point degrees
+        %M                   = integer minutes
+        %<width.precision>m  = floating point minutes
+        %S                   = integer seconds
+        %<width.precision>s  = floating point seconds
+        %E                   = label with E/W instead of +/-
+        %N                   = label with N/S instead of +/-
+ For example, the command `set format x "%Ddeg %5.2mmin %E"` will cause 
+ x coordinate -1.51 to be labeled as `" 1deg 30.60min W"`.
+
+ If the xtics are left in the default state (`set xtics numeric`) the coordinate
+ will be reported as a decimal number of degrees, and `format` will be assumed
+ to contain normal numeric format specifiers rather than the special set above.
 4 xtics rangelimited
 ?set xtics rangelimited
 ?xtics rangelimited
@@ -13760,7 +13889,7 @@ Ffigure_missing
 ?stats
 ?statistics
  Syntax:
-      stats {<ranges>} 'filename' {using N{:M}} {name 'prefix'} {{no}output}
+      stats {<ranges>} 'filename' {matrix | using N{:M}} {name 'prefix'} {{no}output}
 
  This command prepares a statistical summary of the data in one or two columns
  of a file. The using specifier is interpreted in the same way as for plot
@@ -13773,24 +13902,33 @@ Ffigure_missing
  In addition to printed output, the program stores the individual statistics
  into three sets of variables.
  The first set of variables reports how the data is laid out in the file:
-      STATS_records           # total number of in-range data records
+ at start table
+      STATS_records           # total number of in-range data records (N)
       STATS_outofrange        # number of records filtered out by range limits
       STATS_invalid           # number of invalid/incomplete/missing records
       STATS_blank             # number of blank lines in the file
       STATS_blocks            # number of indexable datablocks in the file
       STATS_columns           # number of data columns in the first row of data
+#\begin{tabular}{|lcl|} \hline
+#\verb at STATS_records@    & $~~N~~$ &  total number of in-range data records  \\
+#\verb at STATS_outofrange@ & $~~~~~$  &  number of records filtered out by range limits  \\
+#\verb at STATS_invalid@    & $~~~~~$  &  number of invalid/incomplete/missing records  \\
+#\verb at STATS_blank@      & $~~~~~$  &  number of blank lines in the file  \\
+#\verb at STATS_blocks@     & $~~~~~$  &  number of indexable datablocks in the file  \\
+#\verb at STATS_columns@    & $~~~~~$  &  number of data columns in the first row of data  \\
+ at end table
 
- The second set reports properties of the in-range data from a single
- column.  If the corresponding axis is autoscaled then no range limits
- are applied. If a single column is used, it is affected by the y-axis
- settings. Otherwise the x-axis settings apply to the first and the
- y-axis settings to the second column.
+ The second set reports properties of the in-range data from a single column.
+ This column is treated as y. If the y axis is autoscaled then no range limits
+ are applied. Otherwise only values in the range [ymin:ymax] are considered.
 
- If two columns are being analysed in a single `stats` command, the
- suffix "_x" or "_y" is appended to each variable name.
+ If two columns are analysed jointly by a single `stats` command, the suffix
+ "_x" or "_y" is appended to each variable name.
  I.e. STATS_min_x is the minimum value found in the first column, while
  STATS_min_y is the minimum value found in the second column.
+ In this case points are filtered by testing against both xrange and yrange.
 
+ at start table
       STATS_min               # minimum value of in-range data points
       STATS_max               # maximum value of in-range data points
       STATS_index_min         # index i for which data[i] == STATS_min
@@ -13798,20 +13936,45 @@ Ffigure_missing
       STATS_lo_quartile       # value of the lower (1st) quartile boundary
       STATS_median            # median value
       STATS_up_quartile       # value of the upper (3rd) quartile boundary
-      STATS_mean              # mean value of in-range data points
-      STATS_stddev            # standard deviation of the in-range data points
-      STATS_skewness          # skewness of in-range data points
-      STATS_kurtosis          # excess kurtosis of in-range data points
-      STATS_adev              # mean absolute deviation of the data points
+      STATS_mean              # mean value of the in-range data points
+      STATS_ssd               # sample standard deviation of the in-range data
+                                   = sqrt( Sum[(y-ymean)^2] / (N-1) )
+      STATS_stddev            # population standard deviation of the in-range data
+                                   = sqrt( Sum[(y-ymean)^2] / N )
       STATS_sum               # sum
       STATS_sumsq             # sum of squares
+      STATS_skewness          # skewness of the in-range data points
+      STATS_kurtosis          # kurtosis of the in-range data points
+      STATS_adev              # mean absolute deviation of the in-range data points
       STATS_mean_err          # standard error of the mean value
       STATS_stddev_err        # standard error of the standard deviation
       STATS_skewness_err      # standard error of the skewness
-      STATS_kurtosis_err      # standard error of the excess kurtosis
+      STATS_kurtosis_err      # standard error of the kurtosis
+#\begin{tabular}{|lrll|} \hline
+#\verb at STATS_min@ && $min(y)$ &  minimum value of in-range data points \\
+#\verb at STATS_max@ && $max(y)$ &  maximum value of in-range data points \\
+#\verb at STATS_index_min@ && $i \mid y_i = min(y)$ &  index i for which data[i] == STATS\_min \\
+#\verb at STATS_index_max@ && $i \mid y_i = max(y)$ &  index i for which data[i] == STATS\_max \\
+#\verb at STATS_mean@ & $\bar{y}=$ & $\frac{1}{N}\sum{y}$ &  mean value of the in-range data points \\
+#\verb at STATS_stddev@ & $\sigma_y=$ & $\sqrt{\frac{1}{N}{\sum{{(y-\bar{y})}^2}}}$ &  population standard deviation of the in-range data \\
+#\verb at STATS_ssd@ & $s_y=$ & $\sqrt{\frac{1}{N-1}{\sum{{(y-\bar{y})}^2}}}$ &  sample standard deviation of the in-range data \\
+#\verb at STATS_lo_quartile@ && ~ &  value of the lower (1st) quartile boundary \\
+#\verb at STATS_median@ && ~ &  median value \\
+#\verb at STATS_up_quartile@ && ~ &  value of the upper (3rd) quartile boundary \\
+#\verb at STATS_sum@ && $\sum{y}$ &  sum \\
+#\verb at STATS_sumsq@ && $\sum{y^2}$ &  sum of squares \\
+#\verb at STATS_skewness@ && $\frac{1}{N\sigma^3}\sum{(y-\bar{y})^3}$ &  skewness of the in-range data points \\
+#\verb at STATS_kurtosis@ && $\frac{1}{N\sigma^4}\sum{(y-\bar{y})^4}$ &  kurtosis of the in-range data points \\
+#\verb at STATS_adev@ && $\frac{1}{N}\sum{|{y}-\bar{y}|}$ &  mean absolute deviation of the in-range data \\
+#\verb at STATS_mean_err@ && $\sigma_y / \sqrt{N}$ &  standard error of the mean value \\
+#\verb at STATS_stddev_err@ && $\sigma_y / \sqrt{2N}$ &  standard error of the standard deviation \\
+#\verb at STATS_skewness_err@ && $\sqrt{6/N}$ &  standard error of the skewness \\
+#\verb at STATS_kurtosis_err@ && $\sqrt{24/N}$ &  standard error of the kurtosis \\
+ at end table
 
  The third set of variables is only relevant to analysis of two data columns.
-      STATS_correlation       # correlation coefficient between x and y values
+ at start table
+      STATS_correlation       # sample correlation coefficient between x and y values
       STATS_slope             # A corresponding to a linear fit y = Ax + B
       STATS_slope_err         # uncertainty of A
       STATS_intercept         # B corresponding to a linear fit y = Ax + B
@@ -13819,6 +13982,20 @@ Ffigure_missing
       STATS_sumxy             # sum of x*y
       STATS_pos_min_y         # x coordinate of a point with minimum y value
       STATS_pos_max_y         # x coordinate of a point with maximum y value
+#\begin{tabular}{|lll|} \hline
+#\verb at STATS_correlation@ &   &  sample correlation coefficient between x and y values \\
+#\verb at STATS_slope@       &   &  A corresponding to a linear fit y = Ax + B \\
+#\verb at STATS_slope_err@   &   &  uncertainty of A \\
+#\verb at STATS_intercept@   &   &  B corresponding to a linear fit y = Ax + B \\
+#\verb at STATS_intercept_err@ &   &  uncertainty of B \\
+#\verb at STATS_sumxy@       &   &  sum of x*y \\
+#\verb at STATS_pos_min_y@   &   &  x coordinate of a point with minimum y value \\
+#\verb at STATS_pos_max_y@   &   &  x coordinate of a point with maximum y value \\
+ at end table
+
+ When `matrix` is specified, the `using` option is ignored and the "z"-values 
+ are treated as one-dimensional data set. The matrix dimensions are saved in the
+ variables STATS_size_x and STATS_size_y.
 
  It may be convenient to track the statistics from more than one file at the
  same time. The `name` option causes the default prefix "STATS" to be replaced
@@ -13838,8 +14015,7 @@ Ffigure_missing
  mean value of points N/2 and (N+2)/2. Equivalent treatment is used for the
  quartile boundaries.
 
- For an example of using the `stats` command to help annotate a subsequent plot,
- see
+ For an example of using the `stats` command to annotate a subsequent plot, see
 ^ <a href="http://www.gnuplot.info/demo/stats.html">
  stats.dem.
 ^ </a>
@@ -13937,7 +14113,7 @@ Ffigure_missing
  This command updates the current values of variables stored in the given
  file, which has to be formatted as an initial-value file (as described in the
  `fit` section).
- 
+
  If the file name does not exist, a new file is created containing all
  currently defined user variables. All variables not used in the last fit
  are marked as "#FIXED". This is useful for saving the current values of fit
diff --git a/docs/plotstyles.gnu b/docs/plotstyles.gnu
index e15d76e..f1bf679 100644
--- a/docs/plotstyles.gnu
+++ b/docs/plotstyles.gnu
@@ -1,7 +1,9 @@
 #
-#  Generate a set of figures to illustrate the various plot styles
-#  EAM - July 2007
+#  Generate a set of figures to illustrate the various plot styles.
+#  These figures are imported into the pdf and html versions of the
+#  User Manual.
 #
+#  EAM - July 2007
 #
 
 if (strstrt(GPVAL_TERMINALS, " windows ") == 0) {
@@ -13,6 +15,7 @@ if (strstrt(GPVAL_TERMINALS, " windows ") == 0) {
 if (!exists("winhelp")) winhelp = 0
 if (winhelp == 0) {
     set term pdfcairo mono font fontspec size 3.5,2.0 dashlength 0.2
+# pdfs that need colour have their own terminal setting, check below
     out = "./"
 } else {
 #   prefer pngcairo over gd based png
@@ -81,6 +84,7 @@ plot demo . 'silver.dat' u 1:($2-10.):(symbol(1+int($0)%8)) \
 # Simple bar charts  (same data plotted)
 # ======================================
 #
+# (no reset, keep settings from previous example set)
 set output out . 'figure_boxes' . ext
 set xzeroaxis
 set boxwidth 0.8 relative
@@ -94,10 +98,12 @@ set output out . 'figure_impulses' . ext
 set bmargin at screen .2
 plot demo . 'silver.dat' u 1:($2-10.) with impulses title 'with impulses'
 set bmargin at screen .05
+
 #
 # Error bars and whisker plots
 # ============================
 #
+# (no reset, keep settings from previous example sets)
 set xrange [0:11]
 set yrange [0:10]
 set boxwidth 0.2
@@ -137,6 +143,7 @@ plot demo . 'candlesticks.dat' using 1:4:($1-sin($1)/2.):($1+sin($1)/2.) \
 set output out . 'figure_xerrorlines' . ext
 plot demo . 'candlesticks.dat' using 1:4:($1-sin($1)/2.):($1+sin($1)/2.) \
      with xerrorlines title 'with xerrorlines'
+     
 #
 # Boxplot
 # =======
@@ -154,6 +161,7 @@ unset key
 set style data boxplot
 plot demo . 'silver.dat' using (1):2:(.25) ps 0.3, \
      '' using (1.5):(5*$3):(.25) ps 0.3
+     
 #
 # Dots
 # ====
@@ -173,6 +181,7 @@ unset ytics
 set xrange [-3:3]
 set yrange [-4:4]
 splot invnorm(rand(0)),invnorm(rand(0)),invnorm(rand(0)) with dots notitle
+
 #
 # Histograms
 # ==========
@@ -213,11 +222,13 @@ plot newhistogram "Set A", \
     demo . 'histopt.dat' u 1 t col, '' u 2 t col fs empty
 #
 set output out . 'figure_histcols' . ext
-set style histogram columns
+set style histogram columnstacked
 set title "Columnstacked" offset 0,-1
 set boxwidth 0.8 rel
 set xtics
 
+if (winhelp !=0) {
+# greyscale rgb for png
 set linetype 11 lc rgb "gray0"
 set linetype 12 lc rgb "white"
 set linetype 13 lc rgb "gray40"
@@ -227,8 +238,16 @@ set style fill solid 1.0 border -1
 plot newhistogram lt 11, \
      'histopt.dat' using 1 title column, \
      '' using 2 title column
+} else {
+# patterned fill for pdf
+set style fill pattern
+plot 'histopt.dat' using 1 title column, \
+     '' using 2 title column
+}
+
 #
 # Circles
+# =======
 #
 reset
 set output out . 'figure_circles' . ext
@@ -241,8 +260,10 @@ set xtics font "Times,10" format "%.1f" scale 0.5
 set ytics font "Times,10" format "%.1f" scale 0.5
 plot demo . 'optimize.dat' with circles lc rgb "gray" fs transparent solid 0.2 nobo,\
      demo . 'optimize.dat' u 1:2 with linespoints lw 2 pt 7 ps 0.3 lc rgb "black"
+     
 #
 # Ellipses
+# ========
 #
 reset
 set output out . 'figure_ellipses' . ext
@@ -251,8 +272,10 @@ unset xtics; unset ytics
 plot demo . 'ellipses.dat' u 1:2:3:4:5 with ellipses units xy title "with ellipses",\
      '' u 1:2:3:4:5 with ellipses units xx notitle,\
      '' u 1:2:3:4:5 with ellipses units yy notitle
+     
 #
 # 2D heat map from an array of in-line data
+# =========================================
 #
 reset
 set output out . 'figure_heatmap' . ext
@@ -332,6 +355,10 @@ set style textbox opaque noborder margins 0.25,0.25
 set cntrlabel font ",8"
 splot sin(x) * cos(y), sin(x) * cos(y) with labels boxed
 
+#
+# RGB image mapping
+# =================
+#
 reset
 set output out . 'figure_rgb3D' . ext
 set title "RGB image mapped onto a plane in 3D" offset 0,1
@@ -348,6 +375,10 @@ unset key
 set format z "%.1f"
 splot demo . 'blutux.rgb' binary array=128x128 flip=y format='%uchar%uchar%uchar' with rgbimage
 
+#
+# Rescale image as plot element
+# =============================
+#
 reset
 set output out . 'figure_scaled_image' . ext
 set title "Rescaled image used as plot element"
@@ -370,8 +401,8 @@ plot demo . 'bldg.png' binary filetype=png origin=(0,0)  dx=0.5 dy=1.5 with rgbi
      demo . 'bldg.png' binary filetype=png origin=(110,0) dx=0.5 dy=0.35 with rgbimage notitle
 
 #
-#
 # Demonstrates how to pull font size from a data file column
+# ==========================================================
 #
 reset
 Scale(size) = 0.25*sqrt(sqrt(column(size)))
@@ -388,6 +419,9 @@ set datafile separator "\t"
 plot demo . 'cities.dat' using 5:4:($3 < 5000 ? "-" : CityName(1,3)) with labels
 
 #
+# Polar plot
+# ==========
+#
 reset
 set output out . 'figure_polar' . ext
 unset border
@@ -406,13 +440,95 @@ GPFUN_butterfly = "butterfly(x)=exp(cos(x))-2*cos(4*x)+sin(x/12)**5"
 plot 3.+sin(t)*cos(5*t) with filledcurve above r=2.5 notitle, \
      3.+sin(t)*cos(5*t) with line
 
-reset
 #
-# Parallel axis plot
+# Missing Datapoints
 # ==================
+# (This is not an actual demonstration of the effect, just produces a lookalike)
+# The pdf version of this is supplied seperately to better fit with the LaTeX document.
+#
+reset
+
+$data1<<EOD
+1 10
+2 20
+2 3
+4 40
+5 50
+EOD
+$data2<<EOD
+1 10
+2 20
+4 40
+5 50
+EOD
+$data3<<EOD
+1 10
+2 20
+
+4 40
+5 50
+EOD
+
+if (winhelp != 0) {
+set output out . 'figure_missing' . ext
+
+set xrange [0.1:5.9]
+set yrange [1:55]
+set xtics offset 0, graph .09
+
+set multiplot layout 2,4 columnsfirst margins 0.15,.98,0.1,.98 spacing 0.1
+set ylabel "Old"
+set label 1 at .5,45 "(a)"
+plot $data1 w lp pt 7 notitle
+set ylabel "New"
+plot $data2 w lp pt 7 notitle
+unset ylabel
+set label 1 at .5,45 "(b)"
+plot $data2 w lp pt 7 notitle
+plot $data2 w lp pt 7 notitle
+set label 1 at .5,45 "(c)"
+plot $data2 w lp pt 7 notitle
+plot $data3 w lp pt 7 notitle
+set label 1 at .5,45 "(d)"
+plot $data3 w lp pt 7 notitle
+plot $data3 w lp pt 7 notitle
+
+unset multiplot
+}
+
+#
+# New syntax features
+# ===================
+#
+reset
+set output out . 'figure_newsyntax' . ext
+
+unset xtics
+unset ytics
+unset border
+set yrange [-0.3:1.3]
+set multiplot layout 2,2
+fourier(k, x) = sin(3./2*k)/k * 2./3*cos(k*x)
+do for [power = 0:3] {
+    TERMS = 10**power
+    set xlabel sprintf("%g term Fourier series",TERMS)
+    plot 0.5 + sum [k=1:TERMS] fourier(k,x) notitle lt -1
+}
+unset multiplot
+
+
+#
+# Following example plots will be set in colour mode for pdf output
 #
 if (GPVAL_TERM eq "pdfcairo") \
     set term pdfcairo color font fontspec size 3.5,2.0 dashlength 0.2
+
+
+#
+# Parallel axis plot
+# ==================
+#
+reset
 set output out . 'figure_parallel' . ext
 unset border
 unset key
@@ -426,11 +542,11 @@ set paxis 4 tics  auto 1 left offset 5
 
 plot 'silver.dat' using 2:3:1:($3/2):(int($0/25)) with parallel lt 1 lc variable
 
-reset
 #
 # Filled curves
 # =============
 #
+reset
 set output out . 'figure_filledcurves' . ext
 set style fill solid 0.75 border -1
 set xrange [250:500]
@@ -440,24 +556,6 @@ plot demo . 'silver.dat' u 1:2:($3+$1/50.) w filledcurves above title 'above' lc
                '' u 1:2:($3+$1/50.) w filledcurves below title 'below' lc rgb "dark-violet", \
                '' u 1:2 w lines lt -1 lw 1 title 'curve 1', \
                '' u 1:($3+$1/50.) w lines lt -1 lw 4 title 'curve 2'
-#
-# New syntax features
-#
-set output out . 'figure_newsyntax' . ext
-
-unset xtics
-unset ytics
-unset border
-set yrange [-0.3:1.3]
-set multiplot layout 2,2
-fourier(k, x) = sin(3./2*k)/k * 2./3*cos(k*x)
-do for [power = 0:3] {
-    TERMS = 10**power
-    set xlabel sprintf("%g term Fourier series",TERMS)
-    plot 0.5 + sum [k=1:TERMS] fourier(k,x) notitle lt -1
-}
-unset multiplot
-
 
 # close last file
 unset outp
diff --git a/docs/term-ja.diff b/docs/term-ja.diff
index b68d8aa..3002289 100644
--- a/docs/term-ja.diff
+++ b/docs/term-ja.diff
@@ -181,7 +181,7 @@ diff -rc docs/tex2ja.awk.ORG docs/tex2ja.awk
 *** 0 ****
 --- 1,54 ----
 + #
-+ # $Id: term-ja.diff,v 1.48 2014/07/05 00:05:58 sfeam Exp $
++ # $Id: term-ja.diff,v 1.48.2.1 2014/09/08 17:24:50 sfeam Exp $
 + # doc2tex �ν��Ϥθ����������ץ�
 + # tex2ja.awk
 + # 06/20 2008
@@ -235,8 +235,8 @@ diff -rc docs/tex2ja.awk.ORG docs/tex2ja.awk
 + }
 + 
 diff -rc term/aed.trm.ORG term/aed.trm
-*** term/aed.trm	2006-07-21.ORG 11:35:45.000000000 +0900
---- term/aed.trm	2014-06-17 17:49:22.000000000 +0900
+*** term/aed.trm.ORG	2014-08-29 19:35:10.000000000 +0900
+--- term/aed.trm	2014-09-01 13:52:51.000000000 +0900
 ***************
 *** 203,208 ****
 --- 203,209 ----
@@ -275,8 +275,8 @@ diff -rc term/aed.trm.ORG term/aed.trm
   END_HELP(aed767)
   #endif
 diff -rc term/ai.trm.ORG term/ai.trm
-*** term/ai.trm	2013-01-26.ORG 17:11:08.000000000 +0900
---- term/ai.trm	2014-06-17 17:49:22.000000000 +0900
+*** term/ai.trm.ORG	2014-08-29 19:35:10.000000000 +0900
+--- term/ai.trm	2014-09-01 13:52:51.000000000 +0900
 ***************
 *** 529,534 ****
 --- 529,535 ----
@@ -313,8 +313,8 @@ diff -rc term/ai.trm.ORG term/ai.trm
   END_HELP(ai)
   #endif /* TERM_HELP */
 diff -rc term/aquaterm.trm.ORG term/aquaterm.trm
-*** term/aquaterm.trm	2014-06-11.ORG 19:16:17.000000000 +0900
---- term/aquaterm.trm	2014-06-17 17:49:22.000000000 +0900
+*** term/aquaterm.trm.ORG	2014-08-29 19:35:10.000000000 +0900
+--- term/aquaterm.trm	2014-09-01 13:52:51.000000000 +0900
 ***************
 *** 933,938 ****
 --- 933,939 ----
@@ -368,8 +368,8 @@ diff -rc term/aquaterm.trm.ORG term/aquaterm.trm
   #endif /* TERM_HELP */
   
 diff -rc term/be.trm.ORG term/be.trm
-*** term/be.trm	2013-10-26.ORG 14:58:37.000000000 +0900
---- term/be.trm	2014-06-17 17:49:22.000000000 +0900
+*** term/be.trm.ORG	2014-08-29 19:35:10.000000000 +0900
+--- term/be.trm	2014-09-01 13:52:51.000000000 +0900
 ***************
 *** 390,395 ****
 --- 390,396 ----
@@ -685,8 +685,8 @@ diff -rc term/be.trm.ORG term/be.trm
   END_HELP(be)
   #endif /* TERM_HELP */
 diff -rc term/caca.trm.ORG term/caca.trm
-*** term/caca.trm	2014-06-05.ORG 14:48:27.000000000 +0900
---- term/caca.trm	2014-06-17 17:49:22.000000000 +0900
+*** term/caca.trm.ORG	2014-08-29 19:35:10.000000000 +0900
+--- term/caca.trm	2014-09-01 13:52:51.000000000 +0900
 ***************
 *** 1204,1210 ****
   	if (CACA_charset == CACA_ASCII)
@@ -891,11 +891,11 @@ diff -rc term/caca.trm.ORG term/caca.trm
   #endif /* TERM_HELP */
   
 diff -rc term/cairo.trm.ORG term/cairo.trm
-*** term/cairo.trm	2014-05-30.ORG 20:54:42.000000000 +0900
---- term/cairo.trm	2014-06-17 17:49:22.000000000 +0900
+*** term/cairo.trm.ORG	2014-08-29 19:35:10.000000000 +0900
+--- term/cairo.trm	2014-09-01 13:52:51.000000000 +0900
 ***************
-*** 1386,1391 ****
---- 1386,1392 ----
+*** 1387,1392 ****
+--- 1387,1393 ----
   
   #ifdef TERM_HELP
   START_HELP(epscairo)
@@ -904,8 +904,8 @@ diff -rc term/cairo.trm.ORG term/cairo.trm
   "?set terminal epscairo",
   "?terminal epscairo",
 ***************
-*** 1397,1407 ****
---- 1398,1423 ----
+*** 1398,1408 ****
+--- 1399,1424 ----
   "",
   " Please read the help for the `pdfcairo` terminal."
   ""
@@ -933,8 +933,8 @@ diff -rc term/cairo.trm.ORG term/cairo.trm
   "?set terminal cairolatex",
   "?terminal cairolatex",
 ***************
-*** 1559,1569 ****
---- 1575,1747 ----
+*** 1560,1570 ****
+--- 1576,1748 ----
   " by the `header` command.  Thus, you can use `header` to overwrite some of",
   " settings performed using \"gnuplot.cfg\"",
   ""
@@ -1109,8 +1109,8 @@ diff -rc term/cairo.trm.ORG term/cairo.trm
   "?set terminal pdfcairo",
   "?terminal pdfcairo",
 ***************
-*** 1647,1657 ****
---- 1825,1923 ----
+*** 1648,1658 ****
+--- 1826,1924 ----
   " so that gnuplot can draw a line from non-integer coordinates. This avoids",
   " wobbling effects on diagonal lines ('plot x' for example).",
   ""
@@ -1211,8 +1211,8 @@ diff -rc term/cairo.trm.ORG term/cairo.trm
   "?set terminal pngcairo",
   "?terminal pngcairo",
 ***************
-*** 1731,1736 ****
---- 1997,2086 ----
+*** 1732,1737 ****
+--- 1998,2087 ----
   " so that gnuplot can draw a line from non-integer coordinates. This avoids",
   " wobbling effects on diagonal lines ('plot x' for example).",
   ""
@@ -1304,8 +1304,8 @@ diff -rc term/cairo.trm.ORG term/cairo.trm
   #endif /* TERM_HELP */
   
 diff -rc term/canvas.trm.ORG term/canvas.trm
-*** term/canvas.trm	2014-05-07.ORG 17:27:30.000000000 +0900
---- term/canvas.trm	2014-06-17 17:49:22.000000000 +0900
+*** term/canvas.trm.ORG	2014-08-29 19:35:10.000000000 +0900
+--- term/canvas.trm	2014-09-01 13:52:51.000000000 +0900
 ***************
 *** 1643,1648 ****
 --- 1643,1649 ----
@@ -1404,8 +1404,8 @@ diff -rc term/canvas.trm.ORG term/canvas.trm
   END_HELP(canvas)
   #endif /* TERM_HELP */
 diff -rc term/cgm.trm.ORG term/cgm.trm
-*** term/cgm.trm	2012-12-24.ORG 19:41:45.000000000 +0900
---- term/cgm.trm	2014-06-17 17:49:22.000000000 +0900
+*** term/cgm.trm.ORG	2014-08-29 19:35:10.000000000 +0900
+--- term/cgm.trm	2014-09-01 13:52:51.000000000 +0900
 ***************
 *** 1757,1762 ****
 --- 1757,1763 ----
@@ -1702,8 +1702,8 @@ diff -rc term/cgm.trm.ORG term/cgm.trm
   END_HELP(cgm)
   #endif /* TERM_HELP */
 diff -rc term/context.trm.ORG term/context.trm
-*** term/context.trm	2014-01-31.ORG 16:12:30.000000000 +0900
---- term/context.trm	2014-06-17 17:49:22.000000000 +0900
+*** term/context.trm.ORG	2014-08-29 19:35:10.000000000 +0900
+--- term/context.trm	2014-09-01 13:52:51.000000000 +0900
 ***************
 *** 1974,1979 ****
 --- 1974,1980 ----
@@ -1876,8 +1876,8 @@ diff -rc term/context.trm.ORG term/context.trm
   #endif /* TERM_HELP */
   
 diff -rc term/corel.trm.ORG term/corel.trm
-*** term/corel.trm	2013-01-26.ORG 17:11:08.000000000 +0900
---- term/corel.trm	2014-06-17 17:49:22.000000000 +0900
+*** term/corel.trm.ORG	2014-08-29 19:35:10.000000000 +0900
+--- term/corel.trm	2014-09-01 13:52:51.000000000 +0900
 ***************
 *** 431,436 ****
 --- 431,437 ----
@@ -1917,8 +1917,8 @@ diff -rc term/corel.trm.ORG term/corel.trm
   END_HELP(corel)
   #endif /* TERM_HELP */
 diff -rc term/debug.trm.ORG term/debug.trm
-*** term/debug.trm	2012-10-30.ORG 13:13:32.000000000 +0900
---- term/debug.trm	2014-06-17 17:49:22.000000000 +0900
+*** term/debug.trm.ORG	2014-08-29 19:35:10.000000000 +0900
+--- term/debug.trm	2014-09-01 13:52:51.000000000 +0900
 ***************
 *** 375,380 ****
 --- 375,381 ----
@@ -1949,8 +1949,8 @@ diff -rc term/debug.trm.ORG term/debug.trm
   END_HELP(debug)
   #endif
 diff -rc term/djsvga.trm.ORG term/djsvga.trm
-*** term/djsvga.trm	2013-01-26.ORG 17:11:08.000000000 +0900
---- term/djsvga.trm	2014-06-17 17:49:22.000000000 +0900
+*** term/djsvga.trm.ORG	2014-08-29 19:35:10.000000000 +0900
+--- term/djsvga.trm	2014-09-01 13:52:51.000000000 +0900
 ***************
 *** 473,478 ****
 --- 473,479 ----
@@ -1985,8 +1985,8 @@ diff -rc term/djsvga.trm.ORG term/djsvga.trm
   END_HELP(svga)
   #endif /* TERM_HELP */
 diff -rc term/dumb.trm.ORG term/dumb.trm
-*** term/dumb.trm	2013-04-23.ORG 19:26:21.000000000 +0900
---- term/dumb.trm	2014-06-17 17:49:22.000000000 +0900
+*** term/dumb.trm.ORG	2014-08-29 19:35:10.000000000 +0900
+--- term/dumb.trm	2014-09-01 13:52:51.000000000 +0900
 ***************
 *** 580,585 ****
 --- 580,586 ----
@@ -2051,8 +2051,8 @@ diff -rc term/dumb.trm.ORG term/dumb.trm
   END_HELP(dumb)
   #endif /* TERM_HELP */
 diff -rc term/dxf.trm.ORG term/dxf.trm
-*** term/dxf.trm	2006-07-21.ORG 11:35:45.000000000 +0900
---- term/dxf.trm	2014-06-17 17:49:22.000000000 +0900
+*** term/dxf.trm.ORG	2014-08-29 19:35:10.000000000 +0900
+--- term/dxf.trm	2014-09-01 13:52:51.000000000 +0900
 ***************
 *** 404,409 ****
 --- 404,410 ----
@@ -2089,8 +2089,8 @@ diff -rc term/dxf.trm.ORG term/dxf.trm
   END_HELP(dxf)
   #endif /* TERM_HELP */
 diff -rc term/dxy.trm.ORG term/dxy.trm
-*** term/dxy.trm	2006-07-21.ORG 11:35:45.000000000 +0900
---- term/dxy.trm	2014-06-17 17:49:22.000000000 +0900
+*** term/dxy.trm.ORG	2014-08-29 19:35:10.000000000 +0900
+--- term/dxy.trm	2014-09-01 13:52:51.000000000 +0900
 ***************
 *** 191,196 ****
 --- 191,197 ----
@@ -2121,8 +2121,8 @@ diff -rc term/dxy.trm.ORG term/dxy.trm
   END_HELP(dxy800a)
   #endif
 diff -rc term/eepic.trm.ORG term/eepic.trm
-*** term/eepic.trm	2014-01-31.ORG 16:12:30.000000000 +0900
---- term/eepic.trm	2014-06-17 17:49:22.000000000 +0900
+*** term/eepic.trm.ORG	2014-08-29 19:35:10.000000000 +0900
+--- term/eepic.trm	2014-09-01 13:52:51.000000000 +0900
 ***************
 *** 577,582 ****
 --- 577,583 ----
@@ -2230,11 +2230,11 @@ diff -rc term/eepic.trm.ORG term/eepic.trm
   END_HELP(eepic)
   #endif /* TERM_HELP */
 diff -rc term/emf.trm.ORG term/emf.trm
-*** term/emf.trm	2014-05-23.ORG 10:48:52.000000000 +0900
---- term/emf.trm	2014-06-17 17:49:22.000000000 +0900
+*** term/emf.trm.ORG	2014-08-29 19:35:10.000000000 +0900
+--- term/emf.trm	2014-09-01 13:52:51.000000000 +0900
 ***************
-*** 1952,1957 ****
---- 1952,1958 ----
+*** 1957,1962 ****
+--- 1957,1963 ----
   
   #ifdef TERM_HELP
   START_HELP(emf)
@@ -2243,8 +2243,8 @@ diff -rc term/emf.trm.ORG term/emf.trm
   "?commands set terminal emf",
   "?set terminal emf",
 ***************
-*** 1989,1993 ****
---- 1990,2035 ----
+*** 1994,1998 ****
+--- 1995,2040 ----
   "",
   " Examples:",
   "       set terminal emf 'Times Roman Italic, 12'"
@@ -2292,8 +2292,8 @@ diff -rc term/emf.trm.ORG term/emf.trm
   END_HELP(emf)
   #endif /* TERM_HELP */
 diff -rc term/emxvga.trm.ORG term/emxvga.trm
-*** term/emxvga.trm	2006-07-21.ORG 11:35:46.000000000 +0900
---- term/emxvga.trm	2014-06-17 17:49:22.000000000 +0900
+*** term/emxvga.trm.ORG	2014-08-29 19:35:10.000000000 +0900
+--- term/emxvga.trm	2014-09-01 13:52:51.000000000 +0900
 ***************
 *** 475,480 ****
 --- 475,481 ----
@@ -2348,8 +2348,8 @@ diff -rc term/emxvga.trm.ORG term/emxvga.trm
   END_HELP(emxvga)
   #endif /* TERM_HELP */
 diff -rc term/epson.trm.ORG term/epson.trm
-*** term/epson.trm	2011-11-19.ORG 13:24:17.000000000 +0900
---- term/epson.trm	2014-06-17 17:49:22.000000000 +0900
+*** term/epson.trm.ORG	2014-08-29 19:35:10.000000000 +0900
+--- term/epson.trm	2014-09-01 13:52:51.000000000 +0900
 ***************
 *** 1090,1095 ****
 --- 1090,1096 ----
@@ -2462,8 +2462,8 @@ diff -rc term/epson.trm.ORG term/epson.trm
   END_HELP(epson_180dpi)
   #endif /* TERM_HELP */
 diff -rc term/excl.trm.ORG term/excl.trm
-*** term/excl.trm	2006-07-21.ORG 11:35:46.000000000 +0900
---- term/excl.trm	2014-06-17 17:49:22.000000000 +0900
+*** term/excl.trm.ORG	2014-08-29 19:35:10.000000000 +0900
+--- term/excl.trm	2014-09-01 13:52:51.000000000 +0900
 ***************
 *** 273,278 ****
 --- 273,279 ----
@@ -2494,8 +2494,8 @@ diff -rc term/excl.trm.ORG term/excl.trm
   END_HELP(excl)
   #endif
 diff -rc term/fig.trm.ORG term/fig.trm
-*** term/fig.trm	2011-11-08.ORG 03:32:04.000000000 +0900
---- term/fig.trm	2014-06-17 17:49:22.000000000 +0900
+*** term/fig.trm.ORG	2014-08-29 19:35:10.000000000 +0900
+--- term/fig.trm	2014-09-01 13:52:51.000000000 +0900
 ***************
 *** 1290,1295 ****
 --- 1290,1296 ----
@@ -2611,8 +2611,8 @@ diff -rc term/fig.trm.ORG term/fig.trm
   #endif /* TERM_HELP */
   
 diff -rc term/gd.trm.ORG term/gd.trm
-*** term/gd.trm	2014-05-30.ORG 20:54:42.000000000 +0900
---- term/gd.trm	2014-06-17 17:49:22.000000000 +0900
+*** term/gd.trm.ORG	2014-08-29 19:35:10.000000000 +0900
+--- term/gd.trm	2014-09-01 13:52:51.000000000 +0900
 ***************
 *** 2416,2421 ****
 --- 2416,2422 ----
@@ -2907,8 +2907,8 @@ diff -rc term/gd.trm.ORG term/gd.trm
   #endif /* TERM_HELP */
   #endif /* HAVE_GD_GIF */
 diff -rc term/ggi.trm.ORG term/ggi.trm
-*** term/ggi.trm	2013-08-24.ORG 19:28:06.000000000 +0900
---- term/ggi.trm	2014-06-17 17:49:22.000000000 +0900
+*** term/ggi.trm.ORG	2014-08-29 19:35:10.000000000 +0900
+--- term/ggi.trm	2014-09-01 13:52:51.000000000 +0900
 ***************
 *** 1510,1515 ****
 --- 1510,1516 ----
@@ -2964,8 +2964,8 @@ diff -rc term/ggi.trm.ORG term/ggi.trm
   END_HELP(ggi)
   #endif
 diff -rc term/gpic.trm.ORG term/gpic.trm
-*** term/gpic.trm	2014-03-20.ORG 11:02:16.000000000 +0900
---- term/gpic.trm	2014-06-17 17:49:22.000000000 +0900
+*** term/gpic.trm.ORG	2014-08-29 19:35:10.000000000 +0900
+--- term/gpic.trm	2014-09-01 13:52:51.000000000 +0900
 ***************
 *** 294,299 ****
 --- 294,300 ----
@@ -3045,8 +3045,8 @@ diff -rc term/gpic.trm.ORG term/gpic.trm
   END_HELP(gpic)
   #endif /* TERM_HELP */
 diff -rc term/grass.trm.ORG term/grass.trm
-*** term/grass.trm	2006-07-21.ORG 11:35:46.000000000 +0900
---- term/grass.trm	2014-06-17 17:49:22.000000000 +0900
+*** term/grass.trm.ORG	2014-08-29 19:35:10.000000000 +0900
+--- term/grass.trm	2014-09-01 13:52:51.000000000 +0900
 ***************
 *** 624,629 ****
 --- 624,630 ----
@@ -3079,8 +3079,8 @@ diff -rc term/grass.trm.ORG term/grass.trm
   END_HELP(grass)
   #endif
 diff -rc term/hp26.trm.ORG term/hp26.trm
-*** term/hp26.trm	2007-01-17.ORG 08:11:55.000000000 +0900
---- term/hp26.trm	2014-06-17 17:49:22.000000000 +0900
+*** term/hp26.trm.ORG	2014-08-29 19:35:10.000000000 +0900
+--- term/hp26.trm	2014-09-01 13:52:51.000000000 +0900
 ***************
 *** 691,696 ****
 --- 691,697 ----
@@ -3111,8 +3111,8 @@ diff -rc term/hp26.trm.ORG term/hp26.trm
   END_HELP(hp2623a)
   #endif
 diff -rc term/hp2648.trm.ORG term/hp2648.trm
-*** term/hp2648.trm	2006-07-21.ORG 11:35:47.000000000 +0900
---- term/hp2648.trm	2014-06-17 17:49:22.000000000 +0900
+*** term/hp2648.trm.ORG	2014-08-29 19:35:10.000000000 +0900
+--- term/hp2648.trm	2014-09-01 13:52:51.000000000 +0900
 ***************
 *** 188,193 ****
 --- 188,194 ----
@@ -3143,8 +3143,8 @@ diff -rc term/hp2648.trm.ORG term/hp2648.trm
   END_HELP(hp2648)
   #endif
 diff -rc term/hp500c.trm.ORG term/hp500c.trm
-*** term/hp500c.trm	2006-07-21.ORG 11:35:47.000000000 +0900
---- term/hp500c.trm	2014-06-17 17:49:22.000000000 +0900
+*** term/hp500c.trm.ORG	2014-08-29 19:35:10.000000000 +0900
+--- term/hp500c.trm	2014-09-01 13:52:51.000000000 +0900
 ***************
 *** 527,532 ****
 --- 527,533 ----
@@ -3184,8 +3184,8 @@ diff -rc term/hp500c.trm.ORG term/hp500c.trm
   END_HELP(hp500c)
   #endif /* TERM_HELP */
 diff -rc term/hpgl.trm.ORG term/hpgl.trm
-*** term/hpgl.trm	2012-08-28.ORG 13:43:28.000000000 +0900
---- term/hpgl.trm	2014-06-17 17:49:22.000000000 +0900
+*** term/hpgl.trm.ORG	2014-08-29 19:35:10.000000000 +0900
+--- term/hpgl.trm	2014-09-01 13:52:51.000000000 +0900
 ***************
 *** 2610,2615 ****
 --- 2610,2616 ----
@@ -3286,8 +3286,8 @@ diff -rc term/hpgl.trm.ORG term/hpgl.trm
   END_HELP(hpgl)
   #endif /* TERM_HELP */
 diff -rc term/hpljii.trm.ORG term/hpljii.trm
-*** term/hpljii.trm	2006-07-21.ORG 11:35:47.000000000 +0900
---- term/hpljii.trm	2014-06-17 17:49:22.000000000 +0900
+*** term/hpljii.trm.ORG	2014-08-29 19:35:10.000000000 +0900
+--- term/hpljii.trm	2014-09-01 13:52:51.000000000 +0900
 ***************
 *** 401,406 ****
 --- 401,407 ----
@@ -3335,8 +3335,8 @@ diff -rc term/hpljii.trm.ORG term/hpljii.trm
   END_HELP(hpljii)
   #endif /* TERM_HELP */
 diff -rc term/hppj.trm.ORG term/hppj.trm
-*** term/hppj.trm	2006-07-21.ORG 11:35:47.000000000 +0900
---- term/hppj.trm	2014-06-17 17:49:22.000000000 +0900
+*** term/hppj.trm.ORG	2014-08-29 19:35:10.000000000 +0900
+--- term/hppj.trm	2014-09-01 13:52:51.000000000 +0900
 ***************
 *** 273,278 ****
 --- 273,279 ----
@@ -3372,8 +3372,8 @@ diff -rc term/hppj.trm.ORG term/hppj.trm
   END_HELP(hppj)
   #endif
 diff -rc term/imagen.trm.ORG term/imagen.trm
-*** term/imagen.trm	2006-07-21.ORG 11:35:47.000000000 +0900
---- term/imagen.trm	2014-06-17 17:49:22.000000000 +0900
+*** term/imagen.trm.ORG	2014-08-29 19:35:10.000000000 +0900
+--- term/imagen.trm	2014-09-01 13:52:51.000000000 +0900
 ***************
 *** 886,891 ****
 --- 886,892 ----
@@ -3418,8 +3418,8 @@ diff -rc term/imagen.trm.ORG term/imagen.trm
   END_HELP(imagen)
   #endif
 diff -rc term/kyo.trm.ORG term/kyo.trm
-*** term/kyo.trm	2006-07-21.ORG 11:35:47.000000000 +0900
---- term/kyo.trm	2014-06-17 17:49:22.000000000 +0900
+*** term/kyo.trm.ORG	2014-08-29 19:35:10.000000000 +0900
+--- term/kyo.trm	2014-09-01 13:52:51.000000000 +0900
 ***************
 *** 204,209 ****
 --- 204,210 ----
@@ -3458,8 +3458,8 @@ diff -rc term/kyo.trm.ORG term/kyo.trm
   END_HELP(kyo)
   #endif
 diff -rc term/latex.trm.ORG term/latex.trm
-*** term/latex.trm	2010-09-16.ORG 08:46:20.000000000 +0900
---- term/latex.trm	2014-06-17 17:49:22.000000000 +0900
+*** term/latex.trm.ORG	2014-08-29 19:35:10.000000000 +0900
+--- term/latex.trm	2014-09-01 13:52:51.000000000 +0900
 ***************
 *** 950,955 ****
 --- 950,956 ----
@@ -3541,8 +3541,8 @@ diff -rc term/latex.trm.ORG term/latex.trm
   END_HELP(latex)
   #endif /* TERM_TABLE */
 diff -rc term/linux.trm.ORG term/linux.trm
-*** term/linux.trm	2012-01-31.ORG 04:31:01.000000000 +0900
---- term/linux.trm	2014-06-17 17:49:22.000000000 +0900
+*** term/linux.trm.ORG	2014-08-29 19:35:10.000000000 +0900
+--- term/linux.trm	2014-09-01 13:52:51.000000000 +0900
 ***************
 *** 451,456 ****
 --- 451,457 ----
@@ -3575,8 +3575,8 @@ diff -rc term/linux.trm.ORG term/linux.trm
   END_HELP(linux)
   #endif
 diff -rc term/lua/gnuplot-tikz.help.ORG term/lua/gnuplot-tikz.help
-*** term/lua/gnuplot-tikz.help	2012-04-25.ORG 03:41:38.000000000 +0900
---- term/lua/gnuplot-tikz.help	2014-06-17 17:49:22.000000000 +0900
+*** term/lua/gnuplot-tikz.help.ORG	2014-08-29 19:35:10.000000000 +0900
+--- term/lua/gnuplot-tikz.help	2014-09-01 14:28:37.000000000 +0900
 ***************
 *** 1,3 ****
 --- 1,4 ----
@@ -3585,8 +3585,8 @@ diff -rc term/lua/gnuplot-tikz.help.ORG term/lua/gnuplot-tikz.help
   "?set terminal lua tikz",
   "?set term lua tikz",
 ***************
-*** 165,167 ****
---- 166,340 ----
+*** 166,168 ****
+--- 167,342 ----
   " Strings have to be put in single or double quotes. Double quoted",
   " strings may contain special characters like newlines '\\n' etc.",
   ""
@@ -3603,7 +3603,6 @@ diff -rc term/lua/gnuplot-tikz.help.ORG term/lua/gnuplot-tikz.help
 + "",
 + "      {latex | tex | context}",
 + "      {color | monochrome}",
-+ "      {dashed | solid}",
 + "      {nooriginreset | originreset}",
 + "      {nogparrows | gparrows}",
 + "      {nogppoints | gppoints}",
@@ -3617,6 +3616,7 @@ diff -rc term/lua/gnuplot-tikz.help.ORG term/lua/gnuplot-tikz.help
 + "      {charsize <x>{unit},<y>{unit}}",
 + "      {font \"<fontdesc>\"}",
 + "      {{fontscale | textscale} <scale>}",
++ "      {dashlength | dl <DL>}",
 + "      {nofulldoc | nostandalone | fulldoc | standalone}",
 + "      {{preamble | header} \"<preamble_string>\"}",
 + "      {tikzplot <ltn>,...}",
@@ -3639,8 +3639,6 @@ diff -rc term/lua/gnuplot-tikz.help.ORG term/lua/gnuplot-tikz.help
 + " 'monochrome' �ϡ����ο��դ���̵���ˤ����ɤ��٤��򳥿���Ĵ���ڤ��ؤ���",
 + " ����",
 + "",
-+ " 'solid' �ϡ������Τߤ���Ѥ��ޤ���",
-+ "",
 + " 'originreset' �ϡ�TikZ ��θ���������κ����Ѥذ�ư���ޤ�������Ϥ�",
 + " ���Ĥ���������Ĥ� tikzpicture �Ķ�������󤹤�Τ˻��ѤǤ��ޤ�����",
 + " ��ϡ�multiplot��pm3d ����ǤϽ�ʬ�ˤϥƥ��Ȥ���Ƥ��ޤ���",
@@ -3689,6 +3687,9 @@ diff -rc term/lua/gnuplot-tikz.help.ORG term/lua/gnuplot-tikz.help
 + " ���ץ���� 'fontscale', 'textscale' �ˤϡ��̼���ѥ�᡼����ɬ�פǤ���",
 + " �������Τ��٤Ƥ�ʸ���󤬤��ν̼���ǿ��̤���ޤ���",
 + "",
++ " ���ץ���� 'dashlength' �ޤ��� 'dl' �ϡ�����-������ʬ��Ĺ���� <DL> �ܤ�",
++ " �ޤ�������������μ¿�Ǥ���",
++ "",
 + " ���ץ���� 'tex', 'latex', 'context' �ϡ�TeX ���Ϸ���������Ǥ����ǥե�",
 + " ��Ȥ� LaTeX �Ǥ������Υ�������ե�������ɤ߹���ˤϡ����ʤ���ʸ��ե�",
 + " �������Ƭ���б�����Ԥ�����Ƥ�������:",
@@ -3763,8 +3764,8 @@ diff -rc term/lua/gnuplot-tikz.help.ORG term/lua/gnuplot-tikz.help
 + ""
 + #endif /* JAPANESE_DOC */
 diff -rc term/lua.trm.ORG term/lua.trm
-*** term/lua.trm	2014-06-13.ORG 19:39:52.000000000 +0900
---- term/lua.trm	2014-06-17 17:49:22.000000000 +0900
+*** term/lua.trm.ORG	2014-08-29 19:35:10.000000000 +0900
+--- term/lua.trm	2014-09-01 13:52:51.000000000 +0900
 ***************
 *** 1441,1446 ****
 --- 1441,1447 ----
@@ -3840,8 +3841,8 @@ diff -rc term/lua.trm.ORG term/lua.trm
   END_HELP(tikz)
   #endif /* TERM_HELP */
 diff -rc term/metafont.trm.ORG term/metafont.trm
-*** term/metafont.trm	2006-07-21.ORG 11:35:47.000000000 +0900
---- term/metafont.trm	2014-06-17 17:49:22.000000000 +0900
+*** term/metafont.trm.ORG	2014-08-29 19:35:10.000000000 +0900
+--- term/metafont.trm	2014-09-01 13:52:51.000000000 +0900
 ***************
 *** 540,545 ****
 --- 540,546 ----
@@ -3959,8 +3960,8 @@ diff -rc term/metafont.trm.ORG term/metafont.trm
   END_HELP(mf)
   #endif /* TERM_HELP */
 diff -rc term/metapost.trm.ORG term/metapost.trm
-*** term/metapost.trm	2012-11-26.ORG 07:01:22.000000000 +0900
---- term/metapost.trm	2014-06-17 17:49:22.000000000 +0900
+*** term/metapost.trm.ORG	2014-08-29 19:35:10.000000000 +0900
+--- term/metapost.trm	2014-09-01 13:52:51.000000000 +0900
 ***************
 *** 993,998 ****
 --- 993,999 ----
@@ -4175,8 +4176,8 @@ diff -rc term/metapost.trm.ORG term/metapost.trm
   END_HELP(mp)
   #endif				/* TERM_HELP */
 diff -rc term/mif.trm.ORG term/mif.trm
-*** term/mif.trm	2006-07-21.ORG 11:35:47.000000000 +0900
---- term/mif.trm	2014-06-17 17:49:22.000000000 +0900
+*** term/mif.trm.ORG	2014-08-29 19:35:10.000000000 +0900
+--- term/mif.trm	2014-09-01 13:52:51.000000000 +0900
 ***************
 *** 965,970 ****
 --- 965,971 ----
@@ -4230,8 +4231,8 @@ diff -rc term/mif.trm.ORG term/mif.trm
   END_HELP(mif)
   #endif /* TERM_HELP */
 diff -rc term/next.trm.ORG term/next.trm
-*** term/next.trm	2013-01-26.ORG 17:11:08.000000000 +0900
---- term/next.trm	2014-06-17 17:49:22.000000000 +0900
+*** term/next.trm.ORG	2014-08-29 19:35:10.000000000 +0900
+--- term/next.trm	2014-09-01 13:52:51.000000000 +0900
 ***************
 *** 1501,1506 ****
 --- 1501,1507 ----
@@ -4285,8 +4286,8 @@ diff -rc term/next.trm.ORG term/next.trm
   #endif /* TERM_HELP */
   
 diff -rc term/openstep.trm.ORG term/openstep.trm
-*** term/openstep.trm	2013-01-26.ORG 17:11:08.000000000 +0900
---- term/openstep.trm	2014-06-17 17:49:22.000000000 +0900
+*** term/openstep.trm.ORG	2014-08-29 19:35:10.000000000 +0900
+--- term/openstep.trm	2014-09-01 13:52:51.000000000 +0900
 ***************
 *** 1373,1378 ****
 --- 1373,1379 ----
@@ -4347,8 +4348,8 @@ diff -rc term/openstep.trm.ORG term/openstep.trm
   #endif /* TERM_HELP */
   
 diff -rc term/pbm.trm.ORG term/pbm.trm
-*** term/pbm.trm	2009-06-08.ORG 13:37:29.000000000 +0900
---- term/pbm.trm	2014-06-17 17:49:22.000000000 +0900
+*** term/pbm.trm.ORG	2014-08-29 19:35:10.000000000 +0900
+--- term/pbm.trm	2014-09-01 13:52:51.000000000 +0900
 ***************
 *** 483,488 ****
 --- 483,489 ----
@@ -4401,8 +4402,8 @@ diff -rc term/pbm.trm.ORG term/pbm.trm
   END_HELP(pbm)
   #endif /* TERM_HELP */
 diff -rc term/pc.trm.ORG term/pc.trm
-*** term/pc.trm	2006-07-21.ORG 11:35:47.000000000 +0900
---- term/pc.trm	2014-06-17 17:49:22.000000000 +0900
+*** term/pc.trm.ORG	2014-08-29 19:35:10.000000000 +0900
+--- term/pc.trm	2014-09-01 13:52:51.000000000 +0900
 ***************
 *** 546,551 ****
 --- 546,552 ----
@@ -4434,8 +4435,8 @@ diff -rc term/pc.trm.ORG term/pc.trm
   END_HELP(dospc)
   #endif /* TERM_HELP */
 diff -rc term/pdf.trm.ORG term/pdf.trm
-*** term/pdf.trm	2014-05-07.ORG 17:27:30.000000000 +0900
---- term/pdf.trm	2014-06-17 17:49:22.000000000 +0900
+*** term/pdf.trm.ORG	2014-08-29 19:35:10.000000000 +0900
+--- term/pdf.trm	2014-09-01 13:52:51.000000000 +0900
 ***************
 *** 1718,1723 ****
 --- 1718,1724 ----
@@ -4500,8 +4501,8 @@ diff -rc term/pdf.trm.ORG term/pdf.trm
   END_HELP(pdf)
   #endif
 diff -rc term/pm.trm.ORG term/pm.trm
-*** term/pm.trm	2010-03-15.ORG 07:44:38.000000000 +0900
---- term/pm.trm	2014-06-17 17:49:22.000000000 +0900
+*** term/pm.trm.ORG	2014-08-29 19:35:10.000000000 +0900
+--- term/pm.trm	2014-09-01 13:52:51.000000000 +0900
 ***************
 *** 1247,1252 ****
 --- 1247,1253 ----
@@ -4557,8 +4558,8 @@ diff -rc term/pm.trm.ORG term/pm.trm
   END_HELP(pm)
   #endif /* TERM_HELP */
 diff -rc term/post.trm.ORG term/post.trm
-*** term/post.trm	2014-06-11.ORG 19:16:17.000000000 +0900
---- term/post.trm	2014-06-17 17:49:22.000000000 +0900
+*** term/post.trm.ORG	2014-08-29 19:35:10.000000000 +0900
+--- term/post.trm	2014-09-01 13:52:51.000000000 +0900
 ***************
 *** 4346,4351 ****
 --- 4346,4352 ----
@@ -5207,8 +5208,8 @@ diff -rc term/post.trm.ORG term/post.trm
   END_HELP(post)
   #endif /* TERM_HELP */
 diff -rc term/pstricks.trm.ORG term/pstricks.trm
-*** term/pstricks.trm	2013-10-10.ORG 08:38:18.000000000 +0900
---- term/pstricks.trm	2014-06-17 17:49:22.000000000 +0900
+*** term/pstricks.trm.ORG	2014-08-29 19:35:10.000000000 +0900
+--- term/pstricks.trm	2014-09-01 13:52:51.000000000 +0900
 ***************
 *** 674,679 ****
 --- 674,680 ----
@@ -5252,8 +5253,8 @@ diff -rc term/pstricks.trm.ORG term/pstricks.trm
   END_HELP(pstricks)
   #endif /* TERM_HELP */
 diff -rc term/qms.trm.ORG term/qms.trm
-*** term/qms.trm	2006-07-21.ORG 11:35:48.000000000 +0900
---- term/qms.trm	2014-06-17 17:49:22.000000000 +0900
+*** term/qms.trm.ORG	2014-08-29 19:35:10.000000000 +0900
+--- term/qms.trm	2014-09-01 13:52:51.000000000 +0900
 ***************
 *** 225,230 ****
 --- 225,231 ----
@@ -5284,8 +5285,8 @@ diff -rc term/qms.trm.ORG term/qms.trm
   END_HELP(qms)
   #endif
 diff -rc term/qt.trm.ORG term/qt.trm
-*** term/qt.trm	2014-04-21.ORG 09:41:26.000000000 +0900
---- term/qt.trm	2014-06-17 17:49:22.000000000 +0900
+*** term/qt.trm.ORG	2014-08-29 19:35:10.000000000 +0900
+--- term/qt.trm	2014-09-01 13:52:51.000000000 +0900
 ***************
 *** 80,85 ****
 --- 80,86 ----
@@ -5404,8 +5405,8 @@ diff -rc term/qt.trm.ORG term/qt.trm
   END_HELP(qt)
   #endif /* TERM_HELP */
 diff -rc term/regis.trm.ORG term/regis.trm
-*** term/regis.trm	2006-07-21.ORG 11:35:48.000000000 +0900
---- term/regis.trm	2014-06-17 17:49:22.000000000 +0900
+*** term/regis.trm.ORG	2014-08-29 19:35:10.000000000 +0900
+--- term/regis.trm	2014-09-01 13:52:51.000000000 +0900
 ***************
 *** 258,263 ****
 --- 258,264 ----
@@ -5440,8 +5441,8 @@ diff -rc term/regis.trm.ORG term/regis.trm
   END_HELP(regis)
   #endif
 diff -rc term/sun.trm.ORG term/sun.trm
-*** term/sun.trm	2008-04-19.ORG 13:07:51.000000000 +0900
---- term/sun.trm	2014-06-17 17:49:22.000000000 +0900
+*** term/sun.trm.ORG	2014-08-29 19:35:10.000000000 +0900
+--- term/sun.trm	2014-09-01 13:52:51.000000000 +0900
 ***************
 *** 360,365 ****
 --- 360,366 ----
@@ -5472,8 +5473,8 @@ diff -rc term/sun.trm.ORG term/sun.trm
   END_HELP(sun)
   #endif
 diff -rc term/svg.trm.ORG term/svg.trm
-*** term/svg.trm	2014-06-11.ORG 19:16:17.000000000 +0900
---- term/svg.trm	2014-06-17 17:49:22.000000000 +0900
+*** term/svg.trm.ORG	2014-08-29 19:35:10.000000000 +0900
+--- term/svg.trm	2014-09-01 13:52:51.000000000 +0900
 ***************
 *** 2204,2209 ****
 --- 2204,2210 ----
@@ -5558,8 +5559,8 @@ diff -rc term/svg.trm.ORG term/svg.trm
   END_HELP(svg)
   #endif
 diff -rc term/t410x.trm.ORG term/t410x.trm
-*** term/t410x.trm	2006-07-21.ORG 11:35:48.000000000 +0900
---- term/t410x.trm	2014-06-17 17:49:22.000000000 +0900
+*** term/t410x.trm.ORG	2014-08-29 19:35:10.000000000 +0900
+--- term/t410x.trm	2014-09-01 13:52:51.000000000 +0900
 ***************
 *** 315,320 ****
 --- 315,321 ----
@@ -5590,8 +5591,8 @@ diff -rc term/t410x.trm.ORG term/t410x.trm
   END_HELP(tek410x)
   #endif
 diff -rc term/tek.trm.ORG term/tek.trm
-*** term/tek.trm	2013-12-23.ORG 17:44:53.000000000 +0900
---- term/tek.trm	2014-06-17 17:49:22.000000000 +0900
+*** term/tek.trm.ORG	2014-08-29 19:35:10.000000000 +0900
+--- term/tek.trm	2014-09-01 13:52:51.000000000 +0900
 ***************
 *** 1399,1404 ****
 --- 1399,1405 ----
@@ -5688,8 +5689,8 @@ diff -rc term/tek.trm.ORG term/tek.trm
   END_HELP(tek40)
   #endif /* TERM_HELP */
 diff -rc term/texdraw.trm.ORG term/texdraw.trm
-*** term/texdraw.trm	2006-07-21.ORG 11:35:48.000000000 +0900
---- term/texdraw.trm	2014-06-17 17:49:22.000000000 +0900
+*** term/texdraw.trm.ORG	2014-08-29 19:35:10.000000000 +0900
+--- term/texdraw.trm	2014-09-01 13:52:51.000000000 +0900
 ***************
 *** 368,373 ****
 --- 368,374 ----
@@ -5729,8 +5730,8 @@ diff -rc term/texdraw.trm.ORG term/texdraw.trm
   END_HELP(texdraw)
   #endif /* TERM_HELP */
 diff -rc term/tgif.trm.ORG term/tgif.trm
-*** term/tgif.trm	2014-01-31.ORG 16:12:30.000000000 +0900
---- term/tgif.trm	2014-06-17 17:49:22.000000000 +0900
+*** term/tgif.trm.ORG	2014-08-29 19:35:10.000000000 +0900
+--- term/tgif.trm	2014-09-01 13:52:51.000000000 +0900
 ***************
 *** 1716,1721 ****
 --- 1716,1722 ----
@@ -5822,8 +5823,8 @@ diff -rc term/tgif.trm.ORG term/tgif.trm
   #endif
   /*{{{}}}*/
 diff -rc term/tkcanvas.trm.ORG term/tkcanvas.trm
-*** term/tkcanvas.trm	2006-08-28.ORG 07:10:46.000000000 +0900
---- term/tkcanvas.trm	2014-06-17 17:49:22.000000000 +0900
+*** term/tkcanvas.trm.ORG	2014-08-29 19:35:10.000000000 +0900
+--- term/tkcanvas.trm	2014-09-01 13:52:51.000000000 +0900
 ***************
 *** 611,616 ****
 --- 611,617 ----
@@ -5897,8 +5898,8 @@ diff -rc term/tkcanvas.trm.ORG term/tkcanvas.trm
   END_HELP(tkcanvas)
   #endif
 diff -rc term/tpic.trm.ORG term/tpic.trm
-*** term/tpic.trm	2006-07-21.ORG 11:35:48.000000000 +0900
---- term/tpic.trm	2014-06-17 17:49:22.000000000 +0900
+*** term/tpic.trm.ORG	2014-08-29 19:35:10.000000000 +0900
+--- term/tpic.trm	2014-09-01 13:52:51.000000000 +0900
 ***************
 *** 928,933 ****
 --- 928,934 ----
@@ -5957,8 +5958,8 @@ diff -rc term/tpic.trm.ORG term/tpic.trm
   END_HELP(tpic)
   #endif /* TERM_TABLE */
 diff -rc term/v384.trm.ORG term/v384.trm
-*** term/v384.trm	2006-07-21.ORG 11:35:48.000000000 +0900
---- term/v384.trm	2014-06-17 17:49:22.000000000 +0900
+*** term/v384.trm.ORG	2014-08-29 19:35:10.000000000 +0900
+--- term/v384.trm	2014-09-01 13:52:51.000000000 +0900
 ***************
 *** 194,199 ****
 --- 194,200 ----
@@ -5989,8 +5990,8 @@ diff -rc term/v384.trm.ORG term/v384.trm
   END_HELP(vx384)
   #endif
 diff -rc term/vgagl.trm.ORG term/vgagl.trm
-*** term/vgagl.trm	2013-08-24.ORG 19:28:06.000000000 +0900
---- term/vgagl.trm	2014-06-17 17:49:22.000000000 +0900
+*** term/vgagl.trm.ORG	2014-08-29 19:35:10.000000000 +0900
+--- term/vgagl.trm	2014-09-01 13:52:51.000000000 +0900
 ***************
 *** 1543,1548 ****
 --- 1543,1549 ----
@@ -6069,8 +6070,8 @@ diff -rc term/vgagl.trm.ORG term/vgagl.trm
   #endif
   #endif /* defined(USE_MOUSE) */
 diff -rc term/vws.trm.ORG term/vws.trm
-*** term/vws.trm	2007-10-17.ORG 06:19:45.000000000 +0900
---- term/vws.trm	2014-06-17 17:49:22.000000000 +0900
+*** term/vws.trm.ORG	2014-08-29 19:35:10.000000000 +0900
+--- term/vws.trm	2014-09-01 13:52:51.000000000 +0900
 ***************
 *** 477,482 ****
 --- 477,483 ----
@@ -6102,8 +6103,8 @@ diff -rc term/vws.trm.ORG term/vws.trm
   END_HELP(VWS)
   #endif /* TERM_HELP */
 diff -rc term/win.trm.ORG term/win.trm
-*** term/win.trm	2014-06-11.ORG 19:16:17.000000000 +0900
---- term/win.trm	2014-06-17 17:49:22.000000000 +0900
+*** term/win.trm.ORG	2014-08-29 19:35:10.000000000 +0900
+--- term/win.trm	2014-09-01 13:52:51.000000000 +0900
 ***************
 *** 949,954 ****
 --- 949,955 ----
@@ -6399,11 +6400,11 @@ diff -rc term/win.trm.ORG term/win.trm
   END_HELP(windows)
   #endif /* TERM_HELP */
 diff -rc term/wxt.trm.ORG term/wxt.trm
-*** term/wxt.trm	2014-05-07.ORG 17:27:30.000000000 +0900
---- term/wxt.trm	2014-06-17 17:49:22.000000000 +0900
+*** term/wxt.trm.ORG	2014-08-29 19:35:10.000000000 +0900
+--- term/wxt.trm	2014-09-01 13:52:51.000000000 +0900
 ***************
-*** 502,507 ****
---- 502,508 ----
+*** 499,504 ****
+--- 499,505 ----
   
   #ifdef TERM_HELP
   START_HELP(wxt)
@@ -6412,8 +6413,8 @@ diff -rc term/wxt.trm.ORG term/wxt.trm
   "?set terminal wxt",
   "?terminal wxt",
 ***************
-*** 621,625 ****
---- 622,751 ----
+*** 618,622 ****
+--- 619,748 ----
   " bindings by <ctrl>+<space> and <ctrl>+'q', respectively.",
   " These three keywords (raise, persist and ctrl) can also be set and remembered",
   " between sessions through the configuration dialog."
@@ -6545,8 +6546,8 @@ diff -rc term/wxt.trm.ORG term/wxt.trm
   END_HELP(wxt)
   #endif /* TERM_HELP */
 diff -rc term/x11.trm.ORG term/x11.trm
-*** term/x11.trm	2014-05-07.ORG 17:27:30.000000000 +0900
---- term/x11.trm	2014-06-17 17:49:22.000000000 +0900
+*** term/x11.trm.ORG	2014-08-29 19:35:10.000000000 +0900
+--- term/x11.trm	2014-09-01 14:31:50.000000000 +0900
 ***************
 *** 2350,2355 ****
 --- 2350,2356 ----
@@ -6558,8 +6559,8 @@ diff -rc term/x11.trm.ORG term/x11.trm
   "?commands set terminal x11",
   "?set terminal x11",
 ***************
-*** 2909,2914 ****
---- 2910,3479 ----
+*** 2901,2906 ****
+--- 2902,3463 ----
   "%@gnuplot*fastrotate:  on",
   "%@gnuplot*ctrlq:  off",
   "@end table"
@@ -6759,7 +6760,6 @@ diff -rc term/x11.trm.ORG term/x11.trm
 + "  `-raise`    �����������襦����ɥ�������̤ؽФ�",
 + "  `-noraise`  �����������襦����ɥ�������̤ؽФ����ȤϤ��ʤ�",
 + #ifdef USE_MOUSE
-+ "  `-noevents` �ޥ��������������Ϥ�������ʤ�",
 + "  `-ctrlq   ` ������ɥ��� q �Ǥʤ� ctrl-q ���Ĥ���",
 + #endif
 + "  `-persist`  gnuplot �ץ���ཪλ������襦����ɥ���Ĥ�",
@@ -6772,9 +6772,6 @@ diff -rc term/x11.trm.ORG term/x11.trm
 + "#                 & ���ߤ�ɽ����ʬ���Ф�������Ū�ʰ��֤ˤ���\\\\",
 + "#`-raise`    & �����������襦����ɥ�������̤ؽФ�\\\\",
 + "#`-noraise`  & �����������襦����ɥ�������̤ؽФ����ȤϤ��ʤ�\\\\",
-+ #ifdef USE_MOUSE
-+ "#`-noevents` & �ޥ��������������Ϥ�������ʤ�\\\\",
-+ #endif
 + "#`-persist`  & gnuplot �ץ���ཪλ������襦����ɥ���Ĥ�\\\\",
 + "%c l .",
 + "%`-mono`@���顼�ǥ����ץ쥤��Ƕ���Ū���������",
@@ -6804,10 +6801,6 @@ diff -rc term/x11.trm.ORG term/x11.trm
 + " (0 < v <= 10) �ǡ��㤨�� `-pointsize 2` �ϥǥե���ȤΥ������� 2 �ܡ�",
 + " `-pointsize 0.5` �����̤Υ�������Ⱦʬ�������Ȥ��ޤ���",
 + "",
-+ " `-noevents` �ϥޥ��������������Ƥ����Ϥν�����̵���ˤ��ޤ� (`q` ��",
-+ " `<space>` �ˤ�륦����ɥ��ν�λ�������)������ϡ�gnuplot �Υᥤ���",
-+ " �����Ȥ���Ω�������� x11 �ɥ饤�Ф����Ѥ���ץ�����ͭ�ѤǤ���",
-+ "",
 + " `-ctrlq` �����å��ϡ����襦����ɥ����Ĥ���ۥåȥ����� `q` ����",
 + " `<ctrl>q` ���ѹ����ޤ�������ϡ�`pause mouse keystroke` �ˤ�륭������",
 + " ��������¸��ǽ��ȤäƤ�����ˤϡ�¾�Υ���ե��٥å�ʸ����Ʊ�ͤ�",
@@ -7131,8 +7124,8 @@ diff -rc term/x11.trm.ORG term/x11.trm
   END_HELP(x11)
   #endif				/* TERM_HELP */
 diff -rc term/xlib.trm.ORG term/xlib.trm
-*** term/xlib.trm	2014-05-02.ORG 12:08:03.000000000 +0900
---- term/xlib.trm	2014-06-17 17:49:22.000000000 +0900
+*** term/xlib.trm.ORG	2014-08-29 19:35:10.000000000 +0900
+--- term/xlib.trm	2014-09-01 13:52:51.000000000 +0900
 ***************
 *** 100,105 ****
 --- 100,106 ----
diff --git a/man/gnuplot-ja.1 b/man/gnuplot-ja.1
index f57533d..e36b03e 100644
--- a/man/gnuplot-ja.1
+++ b/man/gnuplot-ja.1
@@ -1,5 +1,5 @@
 .\" dummy line
-.\" $Id: gnuplot-ja.1,v 1.7 2014-06-17 17:31:59+09 shige Exp $
+.\" $Id: gnuplot-ja.1,v 1.8 2014-07-24 16:43:46+09 shige Exp $
 .\" ���ܸ���: Shigeharu TAKENO <shige at iee.niit.ac.jp>
 .\"
 .\" .TH GNUPLOT 1 " 11 June 2014"
@@ -101,8 +101,6 @@ gnuplot 
 \fB\-V\fP �ϡ����ߤΥС�������ɽ�����ޤ���
 .\" .SH X11 OPTIONS
 .SH X11 ���ץ����
-.\" .B Gnuplot
-.\" shige -> ���� ?
 .\" For terminal type x11, \fIgnuplot\fP
 .\" accepts the standard X Toolkit options and resources such as geometry, font,
 .\" and background. See the X(1) man page for a description of common options.
diff --git a/share/LaTeX/gnuplot-lua-tikz-common.tex b/share/LaTeX/gnuplot-lua-tikz-common.tex
index f89220f..d4e29bd 100644
--- a/share/LaTeX/gnuplot-lua-tikz-common.tex
+++ b/share/LaTeX/gnuplot-lua-tikz-common.tex
@@ -9,7 +9,7 @@
 % check for the correct TikZ version
 \def\gpchecktikzversion#1.#2\relax{%
 \ifnum#1<2%
-  \PackageError{gnuplot-lua-tikz}{PGF/TikZ version >= 2.0 is required, but version \pgfversion\space was found}{}%
+  \errmessage{PGF/TikZ version >= 2.0 is required!}%
 \fi}
 \expandafter\gpchecktikzversion\pgfversion\relax
 
@@ -396,6 +396,7 @@
 % dash type settings
 % Define this as a macro so that the dash patterns expand later with the current \pgflinewidth.
 \def\gpdashlength{\pgflinewidth}
+\tikzset{gp dt 0/.style={solid}}
 \tikzset{gp dt 1/.style={solid}}
 \tikzset{gp dt 2/.style={dash pattern=on 7.5*\gpdashlength off 7.5*\gpdashlength}}
 \tikzset{gp dt 3/.style={dash pattern=on 3.75*\gpdashlength off 5.625*\gpdashlength}}
@@ -404,6 +405,8 @@
 \tikzset{gp dt 6/.style={dash pattern=on 5.625*\gpdashlength off 5.625*\gpdashlength on 1*\gpdashlength off 5.625*\gpdashlength}}
 \tikzset{gp dt 7/.style={dash pattern=on 3.75*\gpdashlength off 3.75*\gpdashlength on 3.75*\gpdashlength off 11.25*\gpdashlength}}
 \tikzset{gp dt 8/.style={dash pattern=on 1*\gpdashlength off 3.75*\gpdashlength on 11.25*\gpdashlength off 3.75*\gpdashlength on 1*\gpdashlength off 3.75*\gpdashlength}}
+\tikzset{gp dt solid/.style={solid}}
+\tikzset{gp dt axes/.style={dotted}}
 
 % command for switching to colored lines
 \def\gpcoloredlines{%
diff --git a/share/LaTeX/gnuplot-lua-tikz.sty b/share/LaTeX/gnuplot-lua-tikz.sty
index dfb94b3..2a6fc42 100644
--- a/share/LaTeX/gnuplot-lua-tikz.sty
+++ b/share/LaTeX/gnuplot-lua-tikz.sty
@@ -3,11 +3,11 @@
 %%
 \NeedsTeXFormat{LaTeX2e}
 \ProvidesPackage{gnuplot-lua-tikz}%
-          [2014/06/12 (rev. 100) GNUPLOT Lua terminal style]
+          [2014/11/09 (rev. 100) GNUPLOT Lua terminal style]
 
 \RequirePackage{tikz}
 
-\usetikzlibrary{arrows,patterns,plotmarks,backgrounds}
+\usetikzlibrary{arrows,patterns,plotmarks,backgrounds,fit}
 \input gnuplot-lua-tikz-common.tex
 
 \endinput
diff --git a/src/Makefile.in b/src/Makefile.in
index 0701029..ceee15c 100644
--- a/src/Makefile.in
+++ b/src/Makefile.in
@@ -612,7 +612,7 @@ datablock.$(O) graphics.$(O) mouse.$(O) set.$(O) history.$(O)
 
 
 # List of terminal driver sources
-CORETERM = $(T)aed.trm $(T)ai.trm $(T)aquaterm.trm $(T)be.trm $(T)caca.trm \
+CORETERM = $(T)ai.trm $(T)aquaterm.trm $(T)be.trm $(T)caca.trm \
 $(T)cairo.trm $(T)canvas.trm $(T)cgm.trm $(T)context.trm $(T)corel.trm \
 $(T)debug.trm $(T)djsvga.trm $(T)dumb.trm $(T)dxf.trm $(T)dxy.trm \
 $(T)eepic.trm $(T)emf.trm $(T)emxvga.trm $(T)epson.trm $(T)estimate.trm \
@@ -623,7 +623,7 @@ $(T)lua.trm $(T)metafont.trm $(T)metapost.trm $(T)mif.trm $(T)next.trm \
 $(T)openstep.trm $(T)pbm.trm $(T)pc.trm $(T)pdf.trm $(T)pm.trm \
 $(T)post.trm $(T)pslatex.trm $(T)pstricks.trm $(T)qms.trm $(T)qt.trm \
 $(T)regis.trm $(T)sun.trm $(T)svg.trm $(T)t410x.trm $(T)tek.trm \
-$(T)texdraw.trm $(T)tgif.trm $(T)tkcanvas.trm $(T)tpic.trm $(T)v384.trm \
+$(T)texdraw.trm $(T)tgif.trm $(T)tkcanvas.trm $(T)tpic.trm \
 $(T)vgagl.trm $(T)vws.trm $(T)win.trm $(T)wxt.trm $(T)x11.trm $(T)xlib.trm
 
 all: $(BUILT_SOURCES)
diff --git a/src/axis.c b/src/axis.c
index fb7e279..86141ec 100644
--- a/src/axis.c
+++ b/src/axis.c
@@ -1,5 +1,5 @@
 #ifndef lint
-static char *RCSid() { return RCSid("$Id: axis.c,v 1.135 2014/06/14 15:32:58 sfeam Exp $"); }
+static char *RCSid() { return RCSid("$Id: axis.c,v 1.135.2.2 2014/11/08 04:52:24 sfeam Exp $"); }
 #endif
 
 /* GNUPLOT - axis.c */
@@ -132,6 +132,9 @@ const struct ticdef default_axis_ticdef = DEFAULT_AXIS_TICDEF;
 /* Tic scale for tics with level > 1.  0 means 'inherit minitics scale'  */
 double ticscale[MAX_TICLEVEL] = {1,0.5,1,1,1};
 
+/* global default time format */
+char *timefmt = NULL;
+
 /* axis labels */
 const text_label default_axis_label = EMPTY_LABELSTRUCT;
 
@@ -500,7 +503,7 @@ copy_or_invent_formatstring(AXIS_INDEX axis)
 {
     struct tm t_min, t_max;
 
-    if (axis_array[axis].datatype != DT_TIMEDATE
+    if (axis_array[axis].tictype != DT_TIMEDATE
     ||  !looks_like_numeric(axis_array[axis].formatstring)) {
 	/* The simple case: formatstring is usable, so use it! */
 	strncpy(ticfmt[axis], axis_array[axis].formatstring, MAX_ID_LEN);
@@ -508,7 +511,8 @@ copy_or_invent_formatstring(AXIS_INDEX axis)
 	if (!strcmp(ticfmt[axis], DEF_FORMAT)) {
 	    double axmin = AXIS_DE_LOG_VALUE(axis,axis_array[axis].min);
 	    double axmax = AXIS_DE_LOG_VALUE(axis,axis_array[axis].max);
-	    int precision = (ceil(-log10(fabs(axmax-axmin))));
+	    int precision = ceil(-log10(GPMIN(fabs(axmax-axmin),fabs(axmin))));
+
 	    if ((axmin*axmax > 0) && precision > 4)
 		sprintf(ticfmt[axis],"%%.%df", (precision>14) ? 14 : precision);
 	}
@@ -540,8 +544,8 @@ copy_or_invent_formatstring(AXIS_INDEX axis)
 	if (t_max.tm_year != t_min.tm_year) {
 	    /* different years, include year in ticlabel */
 	    /* check convention, day/month or month/day */
-	    if (strchr(axis_array[axis].timefmt, 'm')
-		< strchr(axis_array[axis].timefmt, 'd')) {
+	    if (strchr(timefmt, 'm')
+		< strchr(timefmt, 'd')) {
 		strcpy(ticfmt[axis], "%m/%d/%");
 	    } else {
 		strcpy(ticfmt[axis], "%d/%m/%");
@@ -554,8 +558,8 @@ copy_or_invent_formatstring(AXIS_INDEX axis)
 
 	} else {
 	    /* Copy day/month order over from input format */
-	    if (strchr(axis_array[axis].timefmt, 'm')
-		< strchr(axis_array[axis].timefmt, 'd')) {
+	    if (strchr(timefmt, 'm')
+		< strchr(timefmt, 'd')) {
 		strcpy(ticfmt[axis], "%m/%d");
 	    } else {
 		strcpy(ticfmt[axis], "%d/%m");
@@ -650,7 +654,7 @@ make_tics(AXIS_INDEX axis, int guide)
     if (axis_array[axis].log && tic < 1.0)
 	  tic = 1.0;
 
-    if (axis_array[axis].datatype == DT_TIMEDATE)
+    if (axis_array[axis].tictype == DT_TIMEDATE)
 	return quantize_time_tics(axis, tic, xr, guide);
     else
 	return tic;
@@ -777,7 +781,7 @@ round_outward(
 			   ? ceil(input / tic)
 			   : floor(input / tic));
 
-    if (axis_array[axis].datatype == DT_TIMEDATE) {
+    if (axis_array[axis].tictype == DT_TIMEDATE) {
 	double ontime = time_tic_just(timelevel[axis], result);
 
 	/* FIXME: how certain is it that we don't want to *always*
@@ -852,7 +856,7 @@ setup_tics(AXIS_INDEX axis, int max)
      * leading to strange misbehaviours of minor tics on time axes.
      * We used to call quantize_time_tics, but that also caused strangeness.
      */
-    if (this->datatype == DT_TIMEDATE && ticdef->type == TIC_SERIES) {
+    if (this->tictype == DT_TIMEDATE && ticdef->type == TIC_SERIES) {
 	if      (tic >= 365*24*60*60.) timelevel[axis] = TIMELEVEL_YEARS;
 	else if (tic >=  28*24*60*60.) timelevel[axis] = TIMELEVEL_MONTHS;
 	else if (tic >=   7*24*60*60.) timelevel[axis] = TIMELEVEL_WEEKS;
@@ -965,10 +969,10 @@ gen_tics(AXIS_INDEX axis, tic_callback callback)
 			mark->label ? mark->label : this->formatstring,
 			log10_base, mark->position);
 		ticlabel = label;
-	    } else if (this->datatype == DT_TIMEDATE) {
+	    } else if (this->tictype == DT_TIMEDATE) {
 		gstrftime(label, MAX_ID_LEN-1, mark->label ? mark->label : ticfmt[axis], mark->position);
 		ticlabel = label;
-	    } else if (this->datatype == DT_DMS) {
+	    } else if (this->tictype == DT_DMS) {
 		gstrdms(label, mark->label ? mark->label : ticfmt[axis], mark->position);
 		ticlabel = label;
 	    } else {
@@ -1139,7 +1143,7 @@ gen_tics(AXIS_INDEX axis, tic_callback callback)
 		    }
 		    /* }}} */
 		}
-	    } else if (this->datatype == DT_TIMEDATE) {
+	    } else if (this->tictype == DT_TIMEDATE) {
 		ministart = ministep =
 		    make_auto_time_minitics(timelevel[axis], step);
 		miniend = step * 0.9;
@@ -1207,7 +1211,7 @@ gen_tics(AXIS_INDEX axis, tic_callback callback)
 		/* Defer translation until after limit check */
 		internal = tic;
 	    } else if (!this->log) {
-		internal = (this->datatype == DT_TIMEDATE)
+		internal = (this->tictype == DT_TIMEDATE)
 		    ? time_tic_just(timelevel[axis], tic)
 		    : tic;
 		user = CheckZero(internal, step);
@@ -1240,10 +1244,10 @@ gen_tics(AXIS_INDEX axis, tic_callback callback)
 		    }
 		default:{	/* comp or series */
 			char label[MAX_ID_LEN]; /* Leave room for enhanced text markup */
-			if (this->datatype == DT_TIMEDATE) {
+			if (this->tictype == DT_TIMEDATE) {
 			    /* If they are doing polar time plot, good luck to them */
 			    gstrftime(label, MAX_ID_LEN-1, ticfmt[axis], (double) user);
-			} else if (this->datatype == DT_DMS) {
+			} else if (this->tictype == DT_DMS) {
 			    gstrdms(label, ticfmt[axis], (double)user);
 			} else if (polar) {
 			    double min = (R_AXIS.autoscale & AUTOSCALE_MIN) ? 0 : R_AXIS.min;
@@ -1288,7 +1292,7 @@ gen_tics(AXIS_INDEX axis, tic_callback callback)
 		/* {{{  process minitics */
 		double mplace, mtic, temptic;
 		for (mplace = ministart; mplace < miniend; mplace += ministep) {
-		    if (this->datatype == DT_TIMEDATE)
+		    if (this->tictype == DT_TIMEDATE)
 			mtic = time_tic_just(timelevel[axis] - 1,
 					     internal + mplace);
 		    else
diff --git a/src/axis.h b/src/axis.h
index f40e050..675c90b 100644
--- a/src/axis.h
+++ b/src/axis.h
@@ -1,5 +1,5 @@
 /*
- * $Id: axis.h,v 1.103 2014/06/14 15:32:58 sfeam Exp $
+ * $Id: axis.h,v 1.103.2.2 2014/11/08 04:52:25 sfeam Exp $
  *
  */
 
@@ -93,7 +93,8 @@ typedef enum en_ticseries_type {
 typedef enum {
     DT_NORMAL=0,		/* default; treat values as pure numeric */
     DT_TIMEDATE,		/* old datatype */
-    DT_DMS			/* degrees minutes seconds */
+    DT_DMS,			/* degrees minutes seconds */
+    DT_UNINITIALIZED
 } td_type;
 
 /* Defines one ticmark for TIC_USER style.
@@ -123,6 +124,7 @@ typedef struct ticdef {
     } def;
     struct position offset;
     TBOOLEAN rangelimited;		/* Limit tics to data range */
+    TBOOLEAN enhanced;			/* Use enhanced text mode or labels */
 } t_ticdef;
 
 /* we want two auto modes for minitics - default where minitics are
@@ -245,9 +247,9 @@ typedef struct axis {
     struct udft_entry *link_udf;
 
 /* time/date axis control */
-    td_type datatype;		/* DT_NORMAL | DT_TIMEDATE | DT_DMS */
+    td_type datatype;		/* {DT_NORMAL|DT_TIMEDATE} controls _input_ */
+    td_type tictype;		/* {DT_NORMAL|DT_TIMEDATE|DT_DMS} controls _output_ */
     char *formatstring;		/* the format string for output */
-    char *timefmt;		/* format string for time input */
 
 /* ticmark control variables */
     int ticmode;		/* tics on border/axis? mirrored? */
@@ -267,7 +269,7 @@ typedef struct axis {
     lp_style_type *zeroaxis;	/* usually points to default_axis_zeroaxis */
 } AXIS;
 
-#define DEFAULT_AXIS_TICDEF {TIC_COMPUTED, NULL, {TC_DEFAULT, 0, 0.0}, {NULL, {0.,0.,0.}, FALSE},  { character, character, character, 0., 0., 0. }, FALSE }
+#define DEFAULT_AXIS_TICDEF {TIC_COMPUTED, NULL, {TC_DEFAULT, 0, 0.0}, {NULL, {0.,0.,0.}, FALSE},  { character, character, character, 0., 0., 0. }, FALSE, TRUE }
 #define DEFAULT_AXIS_ZEROAXIS {0, LT_AXIS, 0, DASHTYPE_AXIS, 0, 1.0, PTSZ_DEFAULT, 0, BLACK_COLORSPEC, DEFAULT_DASHPATTERN}
 
 #define DEFAULT_AXIS_STRUCT {						    \
@@ -284,8 +286,8 @@ typedef struct axis {
 	0,        		/* zero axis position */		    \
 	FALSE, 0.0, 0.0,	/* log, base, log(base) */		    \
 	FALSE, NULL,		/* linked_to_primary, link function */      \
-	DT_NORMAL,		/* datatype */			            \
-	NULL, NULL,     	/* output format, timefmt */		    \
+	DT_NORMAL,		/* datatype for input */	            \
+	DT_NORMAL, NULL,      	/* tictype for output, output format, */    \
 	NO_TICS,		/* tic output positions (border, mirror) */ \
 	DEFAULT_AXIS_TICDEF,	/* tic series definition */		    \
 	0, FALSE, FALSE, 	/* tic_rotate, grid{major,minor} */	    \
@@ -326,6 +328,7 @@ extern const struct ticdef default_axis_ticdef;
 
 /* default parse timedata string */
 #define TIMEFMT "%d/%m/%y,%H:%M"
+extern char *timefmt;
 
 /* axis labels */
 extern const text_label default_axis_label;
@@ -490,7 +493,7 @@ do {									\
 	struct tm tm;							\
 	double usec;							\
 	char *ss = try_to_get_string();					\
-	if (gstrptime(ss,axis_array[axis].timefmt,&tm,&usec))		\
+	if (gstrptime(ss,timefmt,&tm,&usec))				\
 	    (store) = (double) gtimegm(&tm) + usec;			\
 	free(ss);							\
     } else {								\
@@ -628,13 +631,6 @@ do {									  \
     value, value, value, value, value,			\
 	value, value, value, value, value, value }
 
-/* used by set.c */
-#define SET_DEFFORMAT(axis, flag_array)				\
-	if (flag_array[axis]) {					\
-	    free(axis_array[axis].formatstring);		\
-	    axis_array[axis].formatstring = gp_strdup(DEF_FORMAT);	\
-	}
-
 /* FIXME: replace by a subroutine? */
 #define clear_sample_range(axis) do {				\
 	axis_array[SAMPLE_AXIS].range_flags = 0;		\
diff --git a/src/datafile.c b/src/datafile.c
index a41e9c4..00d08a3 100644
--- a/src/datafile.c
+++ b/src/datafile.c
@@ -1,5 +1,5 @@
 #ifndef lint
-static char *RCSid() { return RCSid("$Id: datafile.c,v 1.290 2014/07/30 20:48:58 sfeam Exp $"); }
+static char *RCSid() { return RCSid("$Id: datafile.c,v 1.290.2.3 2014/11/08 04:52:25 sfeam Exp $"); }
 #endif
 
 /* GNUPLOT - datafile.c */
@@ -1311,7 +1311,7 @@ df_open(const char *cmd_filename, int max_using, struct curve_points *plot)
 #endif /* HAVE_SYS_STAT_H */
 
 	if ((data_fp = loadpath_fopen(df_filename, df_binary_file ? "rb" : "r")) == NULL) {
-	    int_warn(NO_CARET, "Skipping unreadable file \"%s\"", df_filename);
+	    int_warn(NO_CARET, "Cannot find or open file \"%s\"", df_filename);
 	    df_eof = 1;
 	    return DF_EOF;
 	}
@@ -2048,7 +2048,7 @@ df_readascii(double v[], int max)
 			timefield = TRUE;
 
 		    if (timefield && (a.type != STRING)
-		    && !strcmp(axis_array[df_axis[output]].timefmt,"%s")) {
+		    && !strcmp(timefmt,"%s")) {
 			/* Handle the case of timefmt "%s" which expects a string */
 			/* containing a number. If evaluate_at() above returned a */
 			/* bare number then we must convert it to a sting before  */
@@ -2078,8 +2078,7 @@ df_readascii(double v[], int max)
 			if (timefield) {
 			    struct tm tm;
 			    double usec = 0.0;
-			    if (gstrptime(a.v.string_val,
-					  axis_array[df_axis[output]].timefmt, &tm, &usec))
+			    if (gstrptime(a.v.string_val, timefmt, &tm, &usec))
 				v[output] = (double) gtimegm(&tm) + usec;
 			    else
 				return_value = DF_BAD;
@@ -2108,8 +2107,7 @@ df_readascii(double v[], int max)
 		    if (column > df_no_cols ||
 			df_column[column - 1].good == DF_MISSING ||
 			!df_column[column - 1].position ||
-			!gstrptime(df_column[column - 1].position,
-				   axis_array[df_axis[output]].timefmt, &tm, &usec)
+			!gstrptime(df_column[column - 1].position, timefmt, &tm, &usec)
 			) {
 			/* line bad only if user explicitly asked for this column */
 			if (df_no_use_specs)
@@ -2354,7 +2352,9 @@ f_dollars(union argument *x)
 	push(Gcomplex(&a, (double) df_datum, 0.0));     /* $0 */
     } else if (column > df_no_cols || df_column[column-1].good != DF_GOOD) {
 	undefined = TRUE;
-	push(&(x->v_arg));      /* this okay ? */
+	/* Nov 2014: This is needed in case the value is referenced */
+	/* in an expression inside a 'using' clause.		    */
+	push(Gcomplex(&a, not_a_number(), 0.0));
     } else
 	push(Gcomplex(&a, df_column[column-1].datum, 0.0));
 }
@@ -2420,7 +2420,9 @@ f_column(union argument *arg)
 	     || df_column[column - 1].good != DF_GOOD
 	     ) {
 	undefined = TRUE;
-	push(&a);               /* any objection to this ? */
+	/* Nov 2014: This is needed in case the value is referenced */
+	/* in an expression inside a 'using' clause.		    */
+	push(Gcomplex(&a, not_a_number(), 0.0));
     } else
 	push(Gcomplex(&a, df_column[column - 1].datum, 0.0));
 }
@@ -2550,13 +2552,29 @@ f_timecolumn(union argument *arg)
     struct value a;
     struct value b;
     struct tm tm;
+    int num_param;
     int column;
     double usec = 0.0;
 
     (void) arg;                 /* avoid -Wunused warning */
+    (void) pop(&b);		/* this is the number of parameters */
+    num_param = b.v.int_val;
     (void) pop(&b);		/* this is the time format string */
-    
-    column = (int) magnitude(pop(&a));
+
+    switch (num_param) {
+    case 2:
+	column = (int) magnitude(pop(&a));
+	break;
+    case 1:
+	/* No format parameter passed (v4-style call) */
+	/* Only needed for backward compatibility */
+	column = magnitude(&b);
+	b.v.string_val = gp_strdup(timefmt);
+	b.type = STRING;
+	break;
+    default:
+	int_error(NO_CARET,"wrong number of parameters to timecolumn");
+    }
 
     if (!evaluate_inside_using)
 	int_error(c_token-1, "timecolumn() called from invalid context");
diff --git a/src/fit.c b/src/fit.c
index e73135b..e7dcb8b 100644
--- a/src/fit.c
+++ b/src/fit.c
@@ -1,5 +1,5 @@
 #ifndef lint
-static char *RCSid() { return RCSid("$Id: fit.c,v 1.145.2.2 2014/08/28 18:04:58 sfeam Exp $"); }
+static char *RCSid() { return RCSid("$Id: fit.c,v 1.145.2.6 2014/11/08 04:52:25 sfeam Exp $"); }
 #endif
 
 /*  NOTICE: Change of Copyright Status
@@ -80,10 +80,10 @@ static char *RCSid() { return RCSid("$Id: fit.c,v 1.145.2.2 2014/08/28 18:04:58
  *
  * Bastian Maerkisch, Feb 2014: New syntax to specify errors. The new
  * parameter 'errors' accepts a comma separated list of (dummy) variables
- * to specify which (in-)dependent variable has associated errors. 'z' always
- * denotes the indep. variable. 'noerrors' tells fit to use equal (1) weights
- * for the fit. The new syntax removes the ambiguity between x:y:z:(1)
- * and x:z:s. The old syntax is still accepted but deprecated.
+ * to specify which (in-)dependent variable has associated errors. 'z'
+ * always denotes the indep. variable. 'unitweights' tells fit to use equal
+ * (1) weights for the fit. The new syntax removes the ambiguity between
+ * x:y:z:(1) and x:z:s. The old syntax is still accepted but deprecated.
  *
  * Alexander Taeschner, Feb 2014: Optionally take errors of independent
  * variables into account.
@@ -192,6 +192,7 @@ TBOOLEAN fit_errorscaling = TRUE;
 TBOOLEAN fit_prescale = TRUE;
 char *fit_script = NULL;
 int fit_wrap = 0;
+TBOOLEAN fit_v4compatible = FALSE;
 
 /* names of user control variables */
 const char * FITLIMIT = "FIT_LIMIT";
@@ -1717,7 +1718,7 @@ log_axis_restriction(FILE *log_f, int param, double min, double max, int autosca
 	putc('*', log_f);
     } else if (param < 2 && axis->datatype == DT_TIMEDATE) {
 	putc('"', log_f);
-	gstrftime(s, 80, axis->timefmt, min);
+	gstrftime(s, 80, timefmt, min);
 	fputs(s, log_f);
 	putc('"', log_f);
     } else {
@@ -1729,7 +1730,7 @@ log_axis_restriction(FILE *log_f, int param, double min, double max, int autosca
 	putc('*', log_f);
     } else if (param < 2 && axis->datatype == DT_TIMEDATE) {
 	putc('"', log_f);
-	gstrftime(s, 80, axis->timefmt, max);
+	gstrftime(s, 80, timefmt, max);
 	fputs(s, log_f);
 	putc('"', log_f);
     } else {
@@ -1902,6 +1903,7 @@ fit_command()
 	fit_dummy_udvs[i] = add_udv_by_name(c_dummy_var[i]);
     }
 
+    memset(fit_dummy_var, 0, sizeof(fit_dummy_var));
     func.at = perm_at();	/* parse expression and save action table */
     dummy_func = NULL;
 
@@ -1937,13 +1939,8 @@ fit_command()
 
     /* BM: New options to distinguish fits with and without errors */
     /* reset error columns */
-    memset(err_cols, FALSE, sizeof(TBOOLEAN) * MAX_NUM_VAR);
-    if (almost_equals(c_token, "noerr$ors")) {
-	/* no error columns given */
-	c_token++;
-	num_indep = (columns == 0) ? 1 : columns - 1;
-	num_errors = 0;
-    } else if (almost_equals(c_token, "err$ors")) {
+    memset(err_cols, FALSE, sizeof(err_cols));
+    if (almost_equals(c_token, "err$ors")) {
 	/* error column specs follow */
 	c_token++;
 	num_errors = 0;
@@ -1987,7 +1984,8 @@ fit_command()
 		num_indep = i + 1;
 	}
 
-	/* Check if there are enough columns.  Require # of indep. and dependent variables + # of errors */
+	/* Check if there are enough columns.
+	   Require # of indep. and dependent variables + # of errors */
 	if ((columns != 0) && (columns < num_indep + 1 + num_errors))
 	    Eexc2(c_token, "Not enough columns in using spec.  At least %i are required for this error spec.",
 		num_indep + 1 + num_errors);
@@ -1995,7 +1993,7 @@ fit_command()
 	/* Success. */
 	if (columns > 0)
 	    num_indep = columns - num_errors - 1;
-    } else if (almost_equals(c_token, "zerr$or")) {
+    } else if (almost_equals(c_token, "zerr$ors")) {
 	/* convenience alias */
 	if (columns == 1)
 	    Eexc(c_token, "zerror requires at least 2 columns");
@@ -2003,15 +2001,7 @@ fit_command()
 	num_errors = 1;
 	err_cols[iz] = TRUE;
 	c_token++;
-    } else if (almost_equals(c_token, "xerr$or")) {
-	/* convenience alias, z:sz (or x:sx) */
-	if ((columns != 0) && (columns != 2))
-	    Eexc(c_token, "xerror requires exactly 2 columns");
-	num_indep = 0;
-	num_errors = 1;
-	err_cols[iz] = TRUE;
-	c_token++;
-    } else if (almost_equals(c_token, "yerr$or")) {
+    } else if (almost_equals(c_token, "yerr$ors")) {
 	/* convenience alias, x:z:sz (or x:y:sy) */
 	if ((columns != 0) && (columns != 3))
 	    Eexc(c_token, "yerror requires exactly 3 columns");
@@ -2019,7 +2009,7 @@ fit_command()
 	num_errors = 1;
 	err_cols[iz] = TRUE;
 	c_token++;
-    } else if (almost_equals(c_token, "xyerr$or")) {
+    } else if (almost_equals(c_token, "xyerr$ors")) {
 	/* convienience alias, x:z:sx:sz (or x:y:sx:sy) */
 	if ((columns != 0) && (columns != 4))
 	    Eexc(c_token, "xyerror requires exactly 4 columns");
@@ -2028,13 +2018,33 @@ fit_command()
 	err_cols[0] = TRUE;
 	err_cols[iz] = TRUE;
 	c_token++;
+    } else if (almost_equals(c_token, "uni$tweights")) {
+	/* 'unitweights' are the default now. So basically this option is only useful in v4 compatibility mode.*/
+	/* no error columns given */
+	c_token++;
+	num_indep = (columns == 0) ? 1 : columns - 1;
+	num_errors = 0;
     } else {
-	/* no error keyword found, using old syntax */
-	num_indep = (columns < 3) ? 1 : columns - 2;
-	num_errors = (columns < 3) ? 0 : 1;
-	if (num_errors > 0)
-	    err_cols[iz] = TRUE;
-	printf("fit: Deprecated syntax. Consider using the '%serror' option, see `help fit`.\n", (num_errors > 0) ? "" : "no");
+	/* no error keyword found */
+	if (fit_v4compatible) {
+	    /* using old syntax */
+	    num_indep = (columns < 3) ? 1 : columns - 2;
+	    num_errors = (columns < 3) ? 0 : 1;
+	    if (num_errors > 0)
+		err_cols[iz] = TRUE;
+	} else if (columns >= 3 && fit_dummy_var[columns-2] == 0) {
+	    int_warn(NO_CARET,
+		"\n\t> Implied independent variable %s not found in fit function."
+		"\n\t> Assuming version 4 syntax with zerror in column %d but no zerror keyword.\n",
+		c_dummy_var[columns-2], columns);
+		num_indep = columns - 2;
+		num_errors = 1;
+		err_cols[iz] = TRUE;
+	} else {
+	    /* default to unitweights */
+	    num_indep = (columns == 0) ? 1 : columns - 1;
+	    num_errors = 0;
+	} 
     }
 
     FPRINTF((stderr, "cmd=%s\n", gp_input_line));
diff --git a/src/fit.h b/src/fit.h
index ffc6fba..d328fd0 100644
--- a/src/fit.h
+++ b/src/fit.h
@@ -1,5 +1,5 @@
 /*
- * $Id: fit.h,v 1.29 2014/04/03 00:37:50 markisch Exp $
+ * $Id: fit.h,v 1.29.2.1 2014/09/21 04:54:32 sfeam Exp $
  */
 
 /* GNUPLOT - fit.h */
@@ -77,6 +77,7 @@ extern char *fit_script;
 extern double epsilon_abs;  /* absolute convergence criterion */
 extern int maxiter;
 extern int fit_wrap;
+extern TBOOLEAN fit_v4compatible;
 
 /* Prototypes of functions exported by fit.c */
 
diff --git a/src/gadgets.c b/src/gadgets.c
index 76117ed..0fd35f1 100644
--- a/src/gadgets.c
+++ b/src/gadgets.c
@@ -1,5 +1,5 @@
 #ifndef lint
-static char *RCSid() { return RCSid("$Id: gadgets.c,v 1.115 2014/08/16 04:47:04 sfeam Exp $"); }
+static char *RCSid() { return RCSid("$Id: gadgets.c,v 1.115.2.1 2014/09/05 21:50:56 sfeam Exp $"); }
 #endif
 
 /* GNUPLOT - gadgets.c */
@@ -703,7 +703,7 @@ get_offsets(
     struct termentry *t,
     int *htic, int *vtic)
 {
-    if (this_label->lp_properties.pointflag) {
+    if ((this_label->lp_properties.flags & LP_SHOW_POINTS)) {
 	*htic = (pointsize * t->h_tic * 0.5);
 	*vtic = (pointsize * t->v_tic * 0.5);
     } else {
@@ -796,7 +796,7 @@ write_label(unsigned int x, unsigned int y, struct text_label *this_label)
 
 	/* The associated point, if any */
 	/* write_multiline() clips text to on_page; do the same for any point */
-	if (this_label->lp_properties.pointflag && on_page(x,y)) {
+	if ((this_label->lp_properties.flags & LP_SHOW_POINTS) && on_page(x,y)) {
 	    term_apply_lp_properties(&this_label->lp_properties);
 	    (*term->point) (x, y, this_label->lp_properties.p_type);
 	    /* the default label color is that of border */
diff --git a/src/gplt_x11.c b/src/gplt_x11.c
index 59914ec..0c80685 100644
--- a/src/gplt_x11.c
+++ b/src/gplt_x11.c
@@ -1,5 +1,5 @@
 #ifndef lint
-static char *RCSid() { return RCSid("$Id: gplt_x11.c,v 1.246 2014/08/15 17:49:45 sfeam Exp $"); }
+static char *RCSid() { return RCSid("$Id: gplt_x11.c,v 1.246.2.2 2014/11/12 05:20:16 sfeam Exp $"); }
 #endif
 
 #define MOUSE_ALL_WINDOWS 1
@@ -1842,12 +1842,16 @@ record()
 #endif
 	    {
 		unsigned int ops, i;
-		sscanf(buf+1, "%u", &ops);
+		int plotno = -1;
+		sscanf(buf+1, "%u %d", &ops, &plotno);
+		plotno++;
 
 		if (!plot)
 			return 1;
 
 		for (i = 1; i <= x11_cur_plotno && i < plot->x11_max_key_boxes; i++) {
+		    if (plotno > 0 && i != plotno)
+			continue;
 		    if ((ops & MODPLOTS_INVERT_VISIBILITIES) == MODPLOTS_INVERT_VISIBILITIES) {
 			plot->x11_key_boxes[i].hidden = !plot->x11_key_boxes[i].hidden;
 		    } else if (ops & MODPLOTS_SET_VISIBLE) {
@@ -2404,6 +2408,7 @@ exec_cmd(plot_struct *plot, char *command)
 		    break;
 	}
 
+#ifdef USE_X11_MULTIBYTE
 	/* FIXME EAM DEBUG: We should not have gotten here without a valid font	*/
 	/* but apparently it can happen in the case of UTF-8.  The sanity check	*/
 	/* below must surely belong somewhere during font selection instead.	*/
@@ -2411,6 +2416,7 @@ exec_cmd(plot_struct *plot, char *command)
 	    usemultibyte = 0;
 	    fprintf(stderr,"gnuplot_x11: invalid multibyte font\n");
 	}
+#endif
 
 	sl = strlen(str) - 1;
 	sw = gpXTextWidth(font, str, sl);
@@ -4597,8 +4603,13 @@ process_configure_notify_event(XEvent *event, TBOOLEAN isRetry )
 		/* Don't replot if we're replotting-on-window-resizes, since replotting
 		   happens elsewhere in those cases. If the inboard driver is dead, and
 		   the window is still around with -persist, replot also. */
+#ifdef PIPE_IPC
 		if ((replot_on_resize != yes) || pipe_died)
 			display(plot);
+#else
+		if (replot_on_resize != yes)
+			display(plot);
+#endif
 
 #ifdef USE_MOUSE
 	    {
diff --git a/src/graph3d.c b/src/graph3d.c
index 398e751..5afa694 100644
--- a/src/graph3d.c
+++ b/src/graph3d.c
@@ -1,5 +1,5 @@
 #ifndef lint
-static char *RCSid() { return RCSid("$Id: graph3d.c,v 1.311 2014/08/18 23:38:01 sfeam Exp $"); }
+static char *RCSid() { return RCSid("$Id: graph3d.c,v 1.311.2.3 2014/09/27 05:49:21 sfeam Exp $"); }
 #endif
 
 /* GNUPLOT - graph3d.c */
@@ -569,21 +569,13 @@ place_arrows3d(int layer)
     for (this_arrow = first_arrow; this_arrow != NULL;
 	 this_arrow = this_arrow->next) {
 	int sx, sy, ex, ey;
-	struct arrow_style_type as = this_arrow->arrow_properties;
 
-	if (as.layer != layer)
+	if (this_arrow->arrow_properties.layer != layer)
 	    continue;
 	if (get_arrow3d(this_arrow, &sx, &sy, &ex, &ey)) {
-	    /* Draw arrow shaft */
-	    term_apply_lp_properties(&(as.lp_properties));
-	    draw_clip_arrow(sx, sy, ex, ey, NOHEAD);
-	    /* Draw arrow head, never use dashed lines */
-	    if (as.head != NOHEAD) {
-		apply_3dhead_properties(&as);
-		as.lp_properties.d_type = DASHTYPE_SOLID;
-		term_apply_lp_properties(&(as.lp_properties));
-		draw_clip_arrow(sx, sy, ex, ey, -as.head);
-	    }
+	    term_apply_lp_properties(&(this_arrow->arrow_properties.lp_properties));
+	    apply_3dhead_properties(&(this_arrow->arrow_properties));
+	    draw_clip_arrow(sx, sy, ex, ey, this_arrow->arrow_properties.head);
 	} else {
 	    FPRINTF((stderr,"place_arrows3d: skipping out-of-bounds arrow\n"));
 	}
@@ -1039,6 +1031,7 @@ do_3dplot(
 	    case ELLIPSES:
 #endif
 	    case POINTSTYLE:
+	    case DOTS:
 		if (draw_this_surface) {
 		    if (!hidden3d || this_plot->opt_out_of_hidden3d)
 			plot3d_points(this_plot);
@@ -1054,15 +1047,6 @@ do_3dplot(
 		}
 		break;
 
-	    case DOTS:
-		if (draw_this_surface) {
-		    this_plot->lp_properties.p_type = -1;
-		    this_plot->lp_properties.pointflag = TRUE;
-		    if (!hidden3d || this_plot->opt_out_of_hidden3d)
-			plot3d_points(this_plot);
-		}
-		break;
-
 	    case VECTOR:
 		if (!hidden3d || this_plot->opt_out_of_hidden3d)
 		    plot3d_vectors(this_plot);
@@ -1808,8 +1792,12 @@ plot3d_points(struct surface_points *plot)
 		    &&  plot->lp_properties.p_size == PTSZ_VARIABLE)
 			(*t->pointsize)(pointsize * point->CRD_PTSIZE);
 
+		    /* This code is also used for "splot ... with dots" */
+		    if (plot->plot_style == DOTS)
+			(*t->point) (x, y, -1);
+
 		    /* The normal case */
-		    if (plot->lp_properties.p_type >= 0)
+		    else if (plot->lp_properties.p_type >= 0)
 			(*t->point) (x, y, plot->lp_properties.p_type);
 
 		    /* Print special character rather than drawn symbol */
@@ -1817,6 +1805,7 @@ plot3d_points(struct surface_points *plot)
 			apply_pm3dcolor(&(plot->labels->textcolor), t);
 			(*t->put_text)(x, y, (char *)(&(plot->lp_properties.p_char)));
 		    }
+
 		}
 	    }
 	}
@@ -2704,8 +2693,10 @@ xtick_callback(
 	angle = axis_array[axis].tic_rotate;
 	if (!(splot_map && angle && term->text_angle(angle)))
 	    angle = 0;
+	ignore_enhanced(!axis_array[axis].ticdef.enhanced);
 	write_multiline(x2+offsetx, y2+offsety, text, just, JUST_TOP,
 			    angle, axis_array[axis].ticdef.font);
+	ignore_enhanced(FALSE);
 	term->text_angle(0);
 	term_apply_lp_properties(&border_lp);
     }
@@ -2825,8 +2816,10 @@ ytick_callback(
 	angle = axis_array[axis].tic_rotate;
 	if (!(splot_map && angle && term->text_angle(angle)))
 	    angle = 0;
+	ignore_enhanced(!axis_array[axis].ticdef.enhanced);
 	write_multiline(x2+offsetx, y2+offsety, text, just, JUST_TOP,
 			angle, axis_array[axis].ticdef.font);
+	ignore_enhanced(FALSE);
 	term->text_angle(0);
 	term_apply_lp_properties(&border_lp);
     }
@@ -2894,8 +2887,10 @@ ztick_callback(
 	    axis_array[axis].ticdef.textcolor.value = place;
 	if (axis_array[axis].ticdef.textcolor.type != TC_DEFAULT)
 	    apply_pm3dcolor(&(axis_array[axis].ticdef.textcolor), term);
+	ignore_enhanced(!axis_array[axis].ticdef.enhanced);
 	write_multiline(x1+offsetx, y1+offsety, text, RIGHT, JUST_CENTRE,
 			0, axis_array[axis].ticdef.font);
+	ignore_enhanced(FALSE);
 	term_apply_lp_properties(&border_lp);
     }
 
diff --git a/src/graphics.c b/src/graphics.c
index 28bc9e3..1f4c532 100644
--- a/src/graphics.c
+++ b/src/graphics.c
@@ -1,5 +1,5 @@
 #ifndef lint
-static char *RCSid() { return RCSid("$Id: graphics.c,v 1.464 2014/08/18 23:38:01 sfeam Exp $"); }
+static char *RCSid() { return RCSid("$Id: graphics.c,v 1.464.2.2 2014/09/27 05:49:22 sfeam Exp $"); }
 #endif
 
 /* GNUPLOT - graphics.c */
@@ -284,23 +284,14 @@ place_arrows(int layer)
 	 this_arrow != NULL;
 	 this_arrow = this_arrow->next) {
 	int sx, sy, ex, ey;
-	struct arrow_style_type as = this_arrow->arrow_properties;
 
-	if (as.layer != layer)
+	if (this_arrow->arrow_properties.layer != layer)
 	    continue;
 	get_arrow(this_arrow, &sx, &sy, &ex, &ey);
 
-	/* Draw arrow shaft */
-	term_apply_lp_properties(&(as.lp_properties));
-	draw_clip_arrow(sx, sy, ex, ey, NOHEAD);
-
-	/* Draw arrow head, never use dashed lines */
-	if (as.head != NOHEAD) {
-	    apply_head_properties(&as);
-	    as.lp_properties.d_type = DASHTYPE_SOLID;
-	    term_apply_lp_properties(&(as.lp_properties));
-	    draw_clip_arrow(sx, sy, ex, ey, -as.head);
-	}
+	term_apply_lp_properties(&(this_arrow->arrow_properties.lp_properties));
+	apply_head_properties(&(this_arrow->arrow_properties));
+	draw_clip_arrow(sx, sy, ex, ey, this_arrow->arrow_properties.head);
     }
     term_apply_lp_properties(&border_lp);
     clip_area = clip_save;
@@ -3357,9 +3348,11 @@ xtick2d_callback(
 	/* User-specified different color for the tics text */
 	if (axis_array[axis].ticdef.textcolor.type != TC_DEFAULT)
 	    apply_pm3dcolor(&(axis_array[axis].ticdef.textcolor), t);
+	ignore_enhanced(!axis_array[axis].ticdef.enhanced);
 	write_multiline(x+(int)offsetx_d, tic_text+(int)offsety_d, text,
 			tic_hjust, tic_vjust, rotate_tics,
 			axis_array[axis].ticdef.font);
+	ignore_enhanced(FALSE);
 	term_apply_lp_properties(&border_lp);	/* reset to border linetype */
     }
 }
@@ -3456,9 +3449,11 @@ ytick2d_callback(
 	/* User-specified different color for the tics text */
 	if (axis_array[axis].ticdef.textcolor.type != TC_DEFAULT)
 	    apply_pm3dcolor(&(axis_array[axis].ticdef.textcolor), t);
+	ignore_enhanced(!axis_array[axis].ticdef.enhanced);
 	write_multiline(tic_text+(int)offsetx_d, y+(int)offsety_d, text,
 			tic_hjust, tic_vjust, rotate_tics,
 			axis_array[axis].ticdef.font);
+	ignore_enhanced(FALSE);
 	term_apply_lp_properties(&border_lp);	/* reset to border linetype */
     }
 }
diff --git a/src/hidden3d.c b/src/hidden3d.c
index 99f4786..6459148 100644
--- a/src/hidden3d.c
+++ b/src/hidden3d.c
@@ -1,5 +1,5 @@
 #ifndef lint
-static char *RCSid() { return RCSid("$Id: hidden3d.c,v 1.99 2014/06/04 03:21:21 sfeam Exp $"); }
+static char *RCSid() { return RCSid("$Id: hidden3d.c,v 1.99.2.3 2014/10/01 01:05:33 sfeam Exp $"); }
 #endif
 
 /* GNUPLOT - hidden3d.c */
@@ -1116,6 +1116,9 @@ build_networks(struct surface_points *plots, int pcount)
 	    nv += 2 * nverts;
 	    ne += nverts;
 	    break;
+	case DOTS:
+	    this_plot->lp_properties.flags |= LP_SHOW_POINTS;
+	    this_plot->lp_properties.p_type = -1;
 	case POINTSTYLE:
 	default:
 	    /* treat all remaining ones like 'points' */
@@ -1171,8 +1174,8 @@ build_networks(struct surface_points *plots, int pcount)
 
 	/* This is a special flag indicating that the user specified an	*/
 	/* explicit surface color in the splot command.			*/
-	if (above == LT_SINGLECOLOR-1)
-	    above = below = LT_SINGLECOLOR;
+	if ((lp->flags & LP_EXPLICIT_COLOR))
+	    below = above;
 
 	/* We will not actually draw PM3D surfaces here, but their 	*/
 	/* edges can be used to calculate occlusion of lines, including */
@@ -1211,7 +1214,7 @@ build_networks(struct surface_points *plots, int pcount)
 		    long int thisvertex;
 		    struct coordinate labelpoint;
 
-		    lp->pointflag = 1; /* Labels can use the code for hidden points */
+		    lp->flags |= LP_SHOW_POINTS; /* Labels can use the code for hidden points */
 		    labelpoint.type = INRANGE;
 		    for (label = this_plot->labels->next; label != NULL; label = label->next) {
 			labelpoint.x = label->place.x;
@@ -1706,7 +1709,7 @@ draw_edge(p_edge e, p_vertex v1, p_vertex v2)
     } else
 
     /* This handles explicit 'lc rgb' in the plot command */
-    if (color.type == TC_RGB && e->style == LT_SINGLECOLOR) {
+    if (color.type == TC_RGB && (lptemp.flags & LP_EXPLICIT_COLOR)) {
 	recolor = TRUE;
     } else
 
@@ -1746,8 +1749,22 @@ draw_edge(p_edge e, p_vertex v1, p_vertex v2)
 	    lptemp.p_type = e->style;
     }
 
+    /* Only the original tip of an arrow should show an arrowhead */
+    /* FIXME:  Arrowhead lines are not themselves subject to hidden line removal */
+    if (arrow) {
+	if (e->v2 != v2-vlist && e->v1 != v1-vlist) {
+		lptemp.p_type = 0;
+	} else if (e->style == PT_BACKARROW) {
+	    if (e->v2 == v2-vlist && e->v1 != v1-vlist)
+		lptemp.p_type = 0;
+	} else {
+	    if (e->v1 == v1-vlist && e->v2 != v2-vlist)
+		lptemp.p_type = 0;
+	}
+    }
+
     draw3d_line_unconditional(v1, v2, &lptemp, color);
-    if (e->lp->pointflag) {
+    if ((e->lp->flags & LP_SHOW_POINTS)) {
 	draw_vertex(v1);
 	draw_vertex(v2);
     }
@@ -2220,7 +2237,7 @@ draw_label_hidden(p_vertex v, struct lp_style_type *lp, int x, int y)
     vlist[thisvertex] = *v;
     vlist[thisvertex].lp_style = lp; /* Not sure this is necessary */
 
-    lp->pointflag = 1; /* Labels can use the code for hidden points */
+    lp->flags |= LP_SHOW_POINTS; /* Labels can use the code for hidden points */
 
     edgenum = make_edge(thisvertex, thisvertex, lp, lp->l_type, -1);
 
diff --git a/src/internal.c b/src/internal.c
index e1d5401..8566864 100644
--- a/src/internal.c
+++ b/src/internal.c
@@ -1,5 +1,5 @@
 #ifndef lint
-static char *RCSid() { return RCSid("$Id: internal.c,v 1.79 2014/05/09 22:14:11 broeker Exp $"); }
+static char *RCSid() { return RCSid("$Id: internal.c,v 1.79.2.1 2014/09/09 03:36:48 sfeam Exp $"); }
 #endif
 
 /* GNUPLOT - internal.c */
@@ -1253,7 +1253,9 @@ f_word(union argument *arg)
 {
     struct value a, b, result;
     int nwords = 0;
+    int in_string = 0;
     int ntarget;
+    char q;
     char *s;
 
     (void) arg;
@@ -1271,15 +1273,24 @@ f_word(union argument *arg)
 	if (!*s)
 	    break;
 	nwords++;
+	if (*s == '"' || *s == '\'') {
+	    q = *s;
+	    s++;
+	    in_string = 1;
+	}
 	if (nwords == ntarget) { /* Found the one we wanted */
 	    Gstring(&result,s);
 	    s = result.v.string_val;
 	}
-	while (*s && !isspace((unsigned char)*s)) s++;
+	while (*s && ((!isspace((unsigned char)*s) && !in_string) || (in_string && *s != q))) s++;
 	if (nwords == ntarget) { /* Terminate this word cleanly */
 	    *s = '\0';
 	    break;
 	}
+	if (in_string && (*s == q)) {
+	    in_string = 0;
+	    s++;
+	}
     }
 
     if (ntarget < 0)
diff --git a/src/interpol.c b/src/interpol.c
index caf6c9a..eb936c0 100644
--- a/src/interpol.c
+++ b/src/interpol.c
@@ -1,5 +1,5 @@
 #ifndef lint
-static char *RCSid() { return RCSid("$Id: interpol.c,v 1.46 2014/05/09 22:14:11 broeker Exp $"); }
+static char *RCSid() { return RCSid("$Id: interpol.c,v 1.46.2.1 2014/09/24 20:14:27 sfeam Exp $"); }
 #endif
 
 /* GNUPLOT - interpol.c */
@@ -1358,14 +1358,16 @@ mcs_interp(struct curve_points *plot)
     int i;
 
     /* These will track the resulting smoothed curve */
-    struct coordinate *new_points = gp_alloc((samples_1+1) * sizeof(coordinate), "mcs");
+    /* V5: Try to ensure that the sampling is fine enough to pass through the original points */
+    int Nsamp = (samples_1 > 2*N) ? samples_1 : 2*N;
+    struct coordinate *new_points = gp_alloc((Nsamp+1) * sizeof(coordinate), "mcs");
     double sxmin = AXIS_LOG_VALUE(plot->x_axis, X_AXIS.min);
     double sxmax = AXIS_LOG_VALUE(plot->x_axis, X_AXIS.max);
     double xstart, xend, xstep;
 
     xstart = GPMAX(p[0].x, sxmin);
     xend = GPMIN(p[N-1].x, sxmax);
-    xstep = (xend - xstart) / (samples_1 - 1);
+    xstep = (xend - xstart) / (Nsamp - 1);
 
     /* Calculate spline coefficients */
 #define DX	xlow
@@ -1399,7 +1401,7 @@ mcs_interp(struct curve_points *plot)
     }
 
     /* Use the coefficients C1, C2, C3 to interpolate over the requested range */
-    for (i = 0; i < samples_1; i++) {
+    for (i = 0; i < Nsamp; i++) {
 	double x = xstart + i * xstep;
 	double y;
 	TBOOLEAN exact = FALSE;
@@ -1440,8 +1442,8 @@ mcs_interp(struct curve_points *plot)
     /* Replace original data with the interpolated curve */
     free(p);
     plot->points = new_points;
-    plot->p_count = samples_1;
-    plot->p_max = samples_1 + 1;
+    plot->p_count = Nsamp;
+    plot->p_max = Nsamp + 1;
 
 #undef DX
 #undef SLOPE
diff --git a/src/makefile.all b/src/makefile.all
index d1db397..c743f15 100644
--- a/src/makefile.all
+++ b/src/makefile.all
@@ -12,7 +12,7 @@ interpol.$(O) datafile.$(O) parse.$(O) standard.$(O) variable.$(O) \
 datablock.$(O) graphics.$(O) mouse.$(O) set.$(O) history.$(O)
 
 # List of terminal driver sources
-CORETERM = $(T)aed.trm $(T)ai.trm $(T)aquaterm.trm $(T)be.trm $(T)caca.trm \
+CORETERM = $(T)ai.trm $(T)aquaterm.trm $(T)be.trm $(T)caca.trm \
 $(T)cairo.trm $(T)canvas.trm $(T)cgm.trm $(T)context.trm $(T)corel.trm \
 $(T)debug.trm $(T)djsvga.trm $(T)dumb.trm $(T)dxf.trm $(T)dxy.trm \
 $(T)eepic.trm $(T)emf.trm $(T)emxvga.trm $(T)epson.trm $(T)estimate.trm \
@@ -23,6 +23,6 @@ $(T)lua.trm $(T)metafont.trm $(T)metapost.trm $(T)mif.trm $(T)next.trm \
 $(T)openstep.trm $(T)pbm.trm $(T)pc.trm $(T)pdf.trm $(T)pm.trm \
 $(T)post.trm $(T)pslatex.trm $(T)pstricks.trm $(T)qms.trm $(T)qt.trm \
 $(T)regis.trm $(T)sun.trm $(T)svg.trm $(T)t410x.trm $(T)tek.trm \
-$(T)texdraw.trm $(T)tgif.trm $(T)tkcanvas.trm $(T)tpic.trm $(T)v384.trm \
+$(T)texdraw.trm $(T)tgif.trm $(T)tkcanvas.trm $(T)tpic.trm \
 $(T)vgagl.trm $(T)vws.trm $(T)win.trm $(T)wxt.trm $(T)x11.trm $(T)xlib.trm
 
diff --git a/src/makefile.awc b/src/makefile.awc
index cc3b044..90286cf 100644
--- a/src/makefile.awc
+++ b/src/makefile.awc
@@ -12,7 +12,7 @@ interpol.$(O) datafile.$(O) parse.$(O) standard.$(O) variable.$(O) &
 datablock.$(O) graphics.$(O) mouse.$(O) set.$(O) history.$(O)
 
 # List of terminal driver sources
-CORETERM = $(T)aed.trm $(T)ai.trm $(T)aquaterm.trm $(T)be.trm $(T)caca.trm &
+CORETERM = $(T)ai.trm $(T)aquaterm.trm $(T)be.trm $(T)caca.trm &
 $(T)cairo.trm $(T)canvas.trm $(T)cgm.trm $(T)context.trm $(T)corel.trm &
 $(T)debug.trm $(T)djsvga.trm $(T)dumb.trm $(T)dxf.trm $(T)dxy.trm &
 $(T)eepic.trm $(T)emf.trm $(T)emxvga.trm $(T)epson.trm $(T)estimate.trm &
@@ -23,6 +23,6 @@ $(T)lua.trm $(T)metafont.trm $(T)metapost.trm $(T)mif.trm $(T)next.trm &
 $(T)openstep.trm $(T)pbm.trm $(T)pc.trm $(T)pdf.trm $(T)pm.trm &
 $(T)post.trm $(T)pslatex.trm $(T)pstricks.trm $(T)qms.trm $(T)qt.trm &
 $(T)regis.trm $(T)sun.trm $(T)svg.trm $(T)t410x.trm $(T)tek.trm &
-$(T)texdraw.trm $(T)tgif.trm $(T)tkcanvas.trm $(T)tpic.trm $(T)v384.trm &
+$(T)texdraw.trm $(T)tgif.trm $(T)tkcanvas.trm $(T)tpic.trm &
 $(T)vgagl.trm $(T)vws.trm $(T)win.trm $(T)wxt.trm $(T)x11.trm $(T)xlib.trm
 
diff --git a/src/misc.c b/src/misc.c
index 11c8de1..ab86612 100644
--- a/src/misc.c
+++ b/src/misc.c
@@ -1,5 +1,5 @@
 #ifndef lint
-static char *RCSid() { return RCSid("$Id: misc.c,v 1.188.2.1 2014/08/21 23:06:55 sfeam Exp $"); }
+static char *RCSid() { return RCSid("$Id: misc.c,v 1.188.2.6 2014/10/07 21:22:56 sfeam Exp $"); }
 #endif
 
 /* GNUPLOT - misc.c */
@@ -434,28 +434,31 @@ lf_pop()
     else
 	fclose(lf->fp);
 
-    for (argindex = 0; argindex < 10; argindex++) {
-	if (call_args[argindex])
-	    free(call_args[argindex]);
-	call_args[argindex] = lf->call_args[argindex];
-    }
-    call_argc = lf->call_argc;
+    /* call arguments are not relevant when invoked from do_string_and_free */
+    if (lf->cmdline == NULL) {
+	for (argindex = 0; argindex < 10; argindex++) {
+	    if (call_args[argindex])
+		free(call_args[argindex]);
+	    call_args[argindex] = lf->call_args[argindex];
+	}
+	call_argc = lf->call_argc;
 
-    /* Restore ARGC and ARG0 ... ARG9 */
-    if ((udv = get_udv_by_name("ARGC"))) {
-	Ginteger(&(udv->udv_value), call_argc);
-    }
-    if ((udv = get_udv_by_name("ARG0"))) {
-	gpfree_string(&(udv->udv_value));
-	Gstring(&(udv->udv_value),
-	    (lf->prev && lf->prev->name) ? gp_strdup(lf->prev->name) : gp_strdup(""));
-    }
-    for (argindex = 1; argindex <= 9; argindex++) {
-	if ((udv = get_udv_by_name(argname[argindex]))) {
+	/* Restore ARGC and ARG0 ... ARG9 */
+	if ((udv = get_udv_by_name("ARGC"))) {
+	    Ginteger(&(udv->udv_value), call_argc);
+	}
+	if ((udv = get_udv_by_name("ARG0"))) {
 	    gpfree_string(&(udv->udv_value));
-	    Gstring(&(udv->udv_value), gp_strdup(call_args[argindex-1]));
-	    if (!call_args[argindex-1])
-		udv->udv_undef = TRUE;
+	    Gstring(&(udv->udv_value),
+		(lf->prev && lf->prev->name) ? gp_strdup(lf->prev->name) : gp_strdup(""));
+	}
+	for (argindex = 1; argindex <= 9; argindex++) {
+	    if ((udv = get_udv_by_name(argname[argindex]))) {
+		gpfree_string(&(udv->udv_value));
+		Gstring(&(udv->udv_value), gp_strdup(call_args[argindex-1]));
+		if (!call_args[argindex-1])
+		    udv->udv_undef = TRUE;
+	    }
 	}
     }
 
@@ -487,9 +490,13 @@ lf_pop()
     return (TRUE);
 }
 
-/* push onto load_file state stack
-   essentially, we save information needed to undo the load_file changes
-   called by load_file */
+/* lf_push is called from two different contexts:
+ *    load_file passes fp and file name (3rd param NULL)
+ *    do_string_and_free passes cmdline (1st and 2nd params NULL)
+ * In either case the routines lf_push/lf_pop save and restore state
+ * information that may be changed by executing commands from a file
+ * or from the passed command line.
+ */
 void
 lf_push(FILE *fp, char *name, char *cmdline)
 {
@@ -509,9 +516,13 @@ lf_push(FILE *fp, char *name, char *cmdline)
     lf->interactive = interactive;	/* save current state */
     lf->inline_num = inline_num;	/* save current line number */
     lf->call_argc = call_argc;
-    for (argindex = 0; argindex < 10; argindex++) {
-	lf->call_args[argindex] = call_args[argindex];
-	call_args[argindex] = NULL;	/* initially no args */
+
+    /* Call arguments are irrelevant if invoked from do_string_and_free */
+    if (cmdline == NULL) {
+	for (argindex = 0; argindex < 10; argindex++) {
+	    lf->call_args[argindex] = call_args[argindex];
+	    call_args[argindex] = NULL;	/* initially no args */
+	}
     }
     lf->depth = lf_head ? lf_head->depth+1 : 0;	/* recursion depth */
     if (lf->depth > STACK_DEPTH)
@@ -1076,7 +1087,7 @@ lp_parse(struct lp_style_type *lp, lp_class destination_class, TBOOLEAN allow_po
 	    if (set_pal++)
 		break;
 	    c_token++;
-	    if (almost_equals(c_token, "rgb$color")) {
+	    if (almost_equals(c_token, "rgb$color") || isstring(c_token)) {
 		c_token--;
 		parse_colorspec(&(newlp.pm3d_color), TC_RGB);
 	    } else if (almost_equals(c_token, "pal$ette")) {
@@ -1222,8 +1233,10 @@ lp_parse(struct lp_style_type *lp, lp_class destination_class, TBOOLEAN allow_po
 
     if (set_pal) {
 	lp->pm3d_color = newlp.pm3d_color;
-	/* FIXME:  This was used by hidden3d but it breaks contour colors! */
-	/* new_lt = LT_SINGLECOLOR; */
+	/* hidden3d uses this to decide that a single color surface is wanted */
+	lp->flags |= LP_EXPLICIT_COLOR;
+    } else {
+	lp->flags &= ~LP_EXPLICIT_COLOR;
     }
     if (set_lw)
 	lp->l_width = newlp.l_width;
@@ -1277,11 +1290,11 @@ parse_fillstyle(struct fill_style_type *fs, int def_style, int def_density, int
 	    fs->fillstyle = FS_EMPTY;
 	    c_token++;
 	} else if (almost_equals(c_token, "s$olid")) {
-	    fs->fillstyle = transparent ? FS_TRANSPARENT_SOLID : FS_SOLID;
+	    fs->fillstyle = FS_SOLID;
 	    set_fill = TRUE;
 	    c_token++;
 	} else if (almost_equals(c_token, "p$attern")) {
-	    fs->fillstyle = transparent ? FS_TRANSPARENT_PATTERN : FS_PATTERN;
+	    fs->fillstyle = FS_PATTERN;
 	    set_fill = TRUE;
 	    c_token++;
 	}
@@ -1315,7 +1328,7 @@ parse_fillstyle(struct fill_style_type *fs, int def_style, int def_density, int
 	if (!(isanumber(c_token) || type_udv(c_token) == INTGR || type_udv(c_token) == CMPLX))
 	    break;
 
-	if (fs->fillstyle == FS_SOLID || fs->fillstyle == FS_TRANSPARENT_SOLID) {
+	if (fs->fillstyle == FS_SOLID) {
 	    /* user sets 0...1, but is stored as an integer 0..100 */
 	    fs->filldensity = 100.0 * real_expression() + 0.5;
 	    if (fs->filldensity < 0)
@@ -1323,13 +1336,19 @@ parse_fillstyle(struct fill_style_type *fs, int def_style, int def_density, int
 	    if (fs->filldensity > 100)
 		fs->filldensity = 100;
 	    set_param = TRUE;
-	} else if (fs->fillstyle == FS_PATTERN || fs->fillstyle == FS_TRANSPARENT_PATTERN) {
+	} else if (fs->fillstyle == FS_PATTERN) {
 	    fs->fillpattern = int_expression();
 	    if (fs->fillpattern < 0)
 		fs->fillpattern = 0;
 	    set_param = TRUE;
 	}
     }
+    if (transparent) {
+	if (fs->fillstyle == FS_SOLID)
+	    fs->fillstyle = FS_TRANSPARENT_SOLID;
+        else if (fs->fillstyle == FS_PATTERN)
+	    fs->fillstyle = FS_TRANSPARENT_PATTERN;
+    }
 }
 
 /*
@@ -1428,6 +1447,12 @@ parse_colorspec(struct t_colorspec *tc, int options)
     } else if (options >= TC_VARIABLE && almost_equals(c_token,"var$iable")) {
 	tc->type = TC_VARIABLE;
 	c_token++;
+
+    /* New: allow to skip the rgb keyword, as in  'plot $foo lc "blue"' */
+    } else if (isstring(c_token)) {
+	tc->type = TC_RGB;
+	tc->lt = parse_color_name();
+
     } else {
 	int_error(c_token, "colorspec option not recognized");
     }
@@ -1591,10 +1616,12 @@ arrow_parse(
 	    
 	    /* Assume adjustable size but check for 'fixed' instead */
 	    arrow->head_fixedsize = FALSE;
-	    if (almost_equals(c_token, "fix$ed")) {
-		arrow->head_fixedsize = TRUE;
-		c_token++;
-	    }
+	    continue;
+	}
+
+	if (almost_equals(c_token, "fix$ed")) {
+	    arrow->head_fixedsize = TRUE;
+	    c_token++;
 	    continue;
 	}
 
diff --git a/src/mouse.c b/src/mouse.c
index 37dc508..0e26f4f 100644
--- a/src/mouse.c
+++ b/src/mouse.c
@@ -1,5 +1,5 @@
 #ifndef lint
-static char *RCSid() { return RCSid("$Id: mouse.c,v 1.168 2014/08/05 17:13:13 sfeam Exp $"); }
+static char *RCSid() { return RCSid("$Id: mouse.c,v 1.168.2.3 2014/11/12 05:20:16 sfeam Exp $"); }
 #endif
 
 /* GNUPLOT - mouse.c */
@@ -488,41 +488,26 @@ GetAnnotateString(char *s, double x, double y, int mode, char *fmt)
 static char *
 xDateTimeFormat(double x, char *b, int mode)
 {
-    time_t xtime_position = SEC_OFFS_SYS + x;
-    struct tm *pxtime_position = gmtime(&xtime_position);
+    struct tm tm;
 
-    if (pxtime_position == NULL) {
-	b[0] = NUL;
-	return b;
-    }
     switch (mode) {
     case MOUSE_COORDINATES_XDATE:
-	sprintf(b, "%d. %d. %04d", pxtime_position->tm_mday, (pxtime_position->tm_mon) + 1,
-# if 1
-		(pxtime_position->tm_year) + ((pxtime_position->tm_year <= 68) ? 2000 : 1900)
-# else
-		((pxtime_position->tm_year) < 100) ? (pxtime_position->tm_year) : (pxtime_position->tm_year) - 100
-		/*              (pxtime_position->tm_year)+1900 */
-# endif
-	    );
+	ggmtime(&tm, x);
+	sprintf(b, "%d. %d. %04d", tm.tm_mday, tm.tm_mon + 1, tm.tm_year);
 	break;
     case MOUSE_COORDINATES_XTIME:
-	sprintf(b, "%d:%02d", pxtime_position->tm_hour, pxtime_position->tm_min);
+	ggmtime(&tm, x);
+	sprintf(b, "%d:%02d", tm.tm_hour, tm.tm_min);
 	break;
     case MOUSE_COORDINATES_XDATETIME:
-	sprintf(b, "%d. %d. %04d %d:%02d", pxtime_position->tm_mday, (pxtime_position->tm_mon) + 1,
-# if 1
-		(pxtime_position->tm_year) + ((pxtime_position->tm_year <= 68) ? 2000 : 1900),
-# else
-		((pxtime_position->tm_year) < 100) ? (pxtime_position->tm_year) : (pxtime_position->tm_year) - 100,
-		/*              (pxtime_position->tm_year)+1900, */
-# endif
-		pxtime_position->tm_hour, pxtime_position->tm_min);
+	ggmtime(&tm, x);
+	sprintf(b, "%d. %d. %04d %d:%02d", tm.tm_mday, tm.tm_mon + 1, tm.tm_year,
+		tm.tm_hour, tm.tm_min);
 	break;
     case MOUSE_COORDINATES_TIMEFMT:
 	/* FIXME HBB 20000507: timefmt is for *reading* timedata, not
 	 * for writing them! */
-	gstrftime(b, 0xff, axis_array[FIRST_X_AXIS].timefmt, x);
+	gstrftime(b, 0xff, timefmt, x);
 	break;
     default:
 	sprintf(b, mouse_setting.fmt, x);
@@ -531,7 +516,6 @@ xDateTimeFormat(double x, char *b, int mode)
 }
 
 
-
 /* HBB 20000507: fixed a construction error. Was using the 'timefmt'
  * string (which is for reading, not writing time data) to output the
  * value. Code is now closer to what setup_tics does. */
@@ -1000,7 +984,7 @@ builtin_set_plots_visible(struct gp_event_t *ge)
 	return "`builtin-set-plots-visible`";
     }
     if (term->modify_plots)
-	term->modify_plots(MODPLOTS_SET_VISIBLE);
+	term->modify_plots(MODPLOTS_SET_VISIBLE, -1);
     return (char *) 0;
 }
 
@@ -1011,7 +995,7 @@ builtin_set_plots_invisible(struct gp_event_t *ge)
 	return "`builtin-set-plots-invisible`";
     }
     if (term->modify_plots)
-	term->modify_plots(MODPLOTS_SET_INVISIBLE);
+	term->modify_plots(MODPLOTS_SET_INVISIBLE, -1);
     return (char *) 0;
 }
 
@@ -1022,7 +1006,7 @@ builtin_invert_plot_visibilities(struct gp_event_t *ge)
 	return "`builtin-invert-plot-visibilities`";
     }
     if (term->modify_plots)
-	term->modify_plots(MODPLOTS_INVERT_VISIBILITIES);
+	term->modify_plots(MODPLOTS_INVERT_VISIBILITIES, -1);
     return (char *) 0;
 }
 
diff --git a/src/parse.c b/src/parse.c
index 036b04c..fd99eca 100644
--- a/src/parse.c
+++ b/src/parse.c
@@ -1,5 +1,5 @@
 #ifndef lint
-static char *RCSid() { return RCSid("$Id: parse.c,v 1.88 2014/07/12 23:58:54 sfeam Exp $"); }
+static char *RCSid() { return RCSid("$Id: parse.c,v 1.88.2.2 2014/11/08 04:52:25 sfeam Exp $"); }
 #endif
 
 /* GNUPLOT - parse.c */
@@ -53,6 +53,7 @@ static int parse_recursion_level;
 /* Exported globals: the current 'dummy' variable names */
 char c_dummy_var[MAX_NUM_VAR][MAX_ID_LEN+1];
 char set_dummy_var[MAX_NUM_VAR][MAX_ID_LEN+1] = { "x", "y" };
+int  fit_dummy_var[MAX_NUM_VAR];
 TBOOLEAN scanning_range_in_progress = FALSE;
 
 /* This is used by plot_option_using() */
@@ -517,6 +518,10 @@ parse_primary_expression()
 		if (!strcmp(ft[whichfunc].f_name,"sprintf"))
 		    add_action(PUSHC)->v_arg = num_params;
 
+		/* v4 timecolumn only had 1 param; v5 has 2. Accept either */
+		if (!strcmp(ft[whichfunc].f_name,"timecolumn"))
+		    add_action(PUSHC)->v_arg = num_params;
+
 		/* The column() function has side effects requiring special handling */
 		if (!strcmp(ft[whichfunc].f_name,"column")) {
 		    set_up_columnheader_parsing( &(at->actions[at->a_count-1]) );
@@ -553,9 +558,11 @@ parse_primary_expression()
 	    if (equals(c_token, c_dummy_var[0])) {
 		c_token++;
 		add_action(PUSHD1)->udf_arg = dummy_func;
+		fit_dummy_var[0]++;
 	    } else if (equals(c_token, c_dummy_var[1])) {
 		c_token++;
 		add_action(PUSHD2)->udf_arg = dummy_func;
+		fit_dummy_var[1]++;
 	    } else {
 		int i, param = 0;
 
@@ -568,6 +575,7 @@ parse_primary_expression()
 			c_token++;
 			add_action(PUSHC)->v_arg = num_params;
 			add_action(PUSHD)->udf_arg = dummy_func;
+			fit_dummy_var[i]++;
 			break;
 		    }
 		}
diff --git a/src/parse.h b/src/parse.h
index 36e6fe4..cb9b368 100644
--- a/src/parse.h
+++ b/src/parse.h
@@ -1,5 +1,5 @@
 /*
- * $Id: parse.h,v 1.29 2014/02/28 19:23:52 sfeam Exp $
+ * $Id: parse.h,v 1.29.2.1 2014/09/19 06:02:18 sfeam Exp $
  */
 
 /* GNUPLOT - parse.h */
@@ -50,6 +50,9 @@ extern TBOOLEAN scanning_range_in_progress;
 /* The choice of dummy variables, as set by 'set dummy', 'set polar'
  * and 'set parametric' */
 extern char set_dummy_var[MAX_NUM_VAR][MAX_ID_LEN+1];
+/* Dummy variables referenced by name in a fit command */
+/* Sep 2014 (DEBUG) used to deduce how many independent variables */
+extern int  fit_dummy_var[MAX_NUM_VAR];
 /* the currently used 'dummy' variables. Usually a copy of
  * set_dummy_var, but may be changed by the '(s)plot' command
  * containing an explicit range (--> 'plot [phi=0..pi]') */
diff --git a/src/plot2d.c b/src/plot2d.c
index 835cb31..ad6b40c 100644
--- a/src/plot2d.c
+++ b/src/plot2d.c
@@ -1,5 +1,5 @@
 #ifndef lint
-static char *RCSid() { return RCSid("$Id: plot2d.c,v 1.336 2014/07/22 23:11:16 sfeam Exp $"); }
+static char *RCSid() { return RCSid("$Id: plot2d.c,v 1.336.2.4 2014/10/31 22:59:52 sfeam Exp $"); }
 #endif
 
 /* GNUPLOT - plot2d.c */
@@ -600,10 +600,13 @@ get_data(struct curve_points *current_plot)
 
     /* EXPERIMENTAL May 2013 - Treating timedata columns as strings allows */
     /* functions column(N) and column("HEADER") to work on time data.	   */
-    if (axis_array[current_plot->x_axis].datatype == DT_TIMEDATE)
-	expect_string(1);
-    if (axis_array[current_plot->y_axis].datatype == DT_TIMEDATE)
-	expect_string(2);
+    /* Sep 2014: But the column count is wrong for HISTOGRAMS */
+    if (current_plot->plot_style != HISTOGRAMS) {
+	if (axis_array[current_plot->x_axis].datatype == DT_TIMEDATE)
+	    expect_string(1);
+	if (axis_array[current_plot->y_axis].datatype == DT_TIMEDATE)
+	    expect_string(2);
+    }
 
     if (df_no_use_specs > max_cols)
 	int_error(NO_CARET, "Too many using specs for this style");
@@ -1873,7 +1876,7 @@ store_label(
 	tl->textcolor = lptmp.pm3d_color;
     }
 
-    if (listhead->lp_properties.pointflag > 0) {
+    if ((listhead->lp_properties.flags & LP_SHOW_POINTS)) {
 	/* Check for optional (point linecolor palette ...) */
 	if (tl->lp_properties.pm3d_color.type == TC_Z)
 	    tl->lp_properties.pm3d_color.value = colorval;
@@ -2112,6 +2115,8 @@ eval_plots()
 	    if (name_str) { /* data file to plot */
 		if (parametric && in_parametric)
 		    int_error(c_token, "previous parametric function not fully specified");
+		if (sample_range_token !=0 && *name_str != '+')
+		    int_warn(sample_range_token, "Ignoring sample range in non-sampled data plot");
 
 		if (*tp_ptr)
 		    this_plot = *tp_ptr;
@@ -2585,7 +2590,7 @@ eval_plots()
 	    /* Some low-level routines expect to find the pointflag attribute */
 	    /* in lp_properties (they don't have access to the full header.   */
 	    if (this_plot->plot_style & PLOT_STYLE_HAS_POINT)
-		this_plot->lp_properties.pointflag = TRUE;
+		this_plot->lp_properties.flags |= LP_SHOW_POINTS;
 
 	    /* Rule out incompatible line/point/style options */
 	    if (this_plot->plot_type == FUNC) {
@@ -2630,6 +2635,15 @@ eval_plots()
 	    this_plot->x_axis = x_axis;
 	    this_plot->y_axis = y_axis;
 
+	    /* If we got this far without initializing the character font, do it now */
+	    if (this_plot->plot_style & PLOT_STYLE_HAS_POINT
+	    &&  this_plot->lp_properties.p_type == PT_CHARACTER) {
+		if (this_plot->labels == NULL) {
+		    this_plot->labels = new_text_label(-1);
+		    this_plot->labels->pos = CENTRE;
+		}
+	    }
+
 	    /* If we got this far without initializing the label list, do it now */
 	    if (this_plot->plot_style == LABELPOINTS) {
 		if (this_plot->labels == NULL) {
@@ -2650,7 +2664,7 @@ eval_plots()
 		/* We want to trigger the variable color mechanism even if 
 		 * there was no 'textcolor variable/palette/rgb var' , 
 		 * but there was a 'point linecolor variable/palette/rgb var'. */
-		if (this_plot->labels->lp_properties.pointflag > 0
+		if ((this_plot->labels->lp_properties.flags & LP_SHOW_POINTS)
 		&& this_plot->labels->textcolor.type != TC_Z
 		&& this_plot->labels->textcolor.type != TC_VARIABLE
 		&& (this_plot->labels->textcolor.type != TC_RGB 
diff --git a/src/plot3d.c b/src/plot3d.c
index a2828ec..680244e 100644
--- a/src/plot3d.c
+++ b/src/plot3d.c
@@ -1,5 +1,5 @@
 #ifndef lint
-static char *RCSid() { return RCSid("$Id: plot3d.c,v 1.231 2014/05/28 23:21:07 sfeam Exp $"); }
+static char *RCSid() { return RCSid("$Id: plot3d.c,v 1.231.2.1 2014/09/05 21:50:57 sfeam Exp $"); }
 #endif
 
 /* GNUPLOT - plot3d.c */
@@ -1666,7 +1666,7 @@ eval_3dplots()
 
 		    lp.l_type = line_num;
 		    lp.p_type = line_num;
-			lp.d_type = line_num;
+		    lp.d_type = line_num;
 
 		    /* user may prefer explicit line styles */
 		    if (prefer_line_styles)
@@ -1787,7 +1787,7 @@ eval_3dplots()
 	    /* Some low-level routines expect to find the pointflag attribute */
 	    /* in lp_properties (they don't have access to the full header).  */
 	    if (this_plot->plot_style & PLOT_STYLE_HAS_POINT)
-		this_plot->lp_properties.pointflag = TRUE;
+		this_plot->lp_properties.flags |= LP_SHOW_POINTS;
 
 	    /* Rule out incompatible line/point/style options */
 	    if (this_plot->plot_type == FUNC3D) {
@@ -2360,6 +2360,6 @@ static void load_contour_label_options (struct text_label *contour_label)
     if (!contour_label->font)
 	contour_label->font = gp_strdup(clabel_font);
     lp->p_interval = clabel_interval;
-    lp->pointflag = TRUE;
+    lp->flags |= LP_SHOW_POINTS;
     lp_parse(lp, LP_ADHOC, TRUE);
 }
diff --git a/src/qtterminal/QtGnuplotScene.cpp b/src/qtterminal/QtGnuplotScene.cpp
index ab18d09..c4053b5 100644
--- a/src/qtterminal/QtGnuplotScene.cpp
+++ b/src/qtterminal/QtGnuplotScene.cpp
@@ -503,7 +503,9 @@ void QtGnuplotScene::processEvent(QtGnuplotEventType type, QDataStream& in)
 	{
 		int i = m_key_boxes.count();
 		unsigned int ops_i;
+		int plotno;
 		in >> ops_i;
+		in >> plotno;
 		enum QtGnuplotModPlots ops = (enum QtGnuplotModPlots) ops_i;
 
 		/* FIXME: This shouldn't happen, but it does. */
@@ -512,6 +514,10 @@ void QtGnuplotScene::processEvent(QtGnuplotEventType type, QDataStream& in)
 		    i = m_plot_group.count();
 
 		while (i-- > 0) {
+			/* Does operation only affect a single plot? */
+			if (plotno >= 0 && i != plotno)
+				continue;
+
 			bool isVisible = m_plot_group[i]->isVisible();
 
 			switch (ops) {
diff --git a/src/qtterminal/qt_term.cpp b/src/qtterminal/qt_term.cpp
index a9ca128..4e4cff7 100644
--- a/src/qtterminal/qt_term.cpp
+++ b/src/qtterminal/qt_term.cpp
@@ -1486,14 +1486,16 @@ void qt_boxed_text(unsigned int x, unsigned int y, int option)
 }
 #endif
 
-void qt_modify_plots(unsigned int ops)
+void qt_modify_plots(unsigned int ops, int plotno)
 {
+	if (!qt)
+		return;
 	if ((ops & MODPLOTS_INVERT_VISIBILITIES) == MODPLOTS_INVERT_VISIBILITIES) {
-		qt->out << GEModPlots << QTMODPLOTS_INVERT_VISIBILITIES;
+		qt->out << GEModPlots << QTMODPLOTS_INVERT_VISIBILITIES << plotno;
 	} else if (ops & MODPLOTS_SET_VISIBLE) {
-		qt->out << GEModPlots << QTMODPLOTS_SET_VISIBLE;
+		qt->out << GEModPlots << QTMODPLOTS_SET_VISIBLE << plotno;
 	} else if (ops & MODPLOTS_SET_INVISIBLE) {
-		qt->out << GEModPlots << QTMODPLOTS_SET_INVISIBLE;
+		qt->out << GEModPlots << QTMODPLOTS_SET_INVISIBLE << plotno;
 	}
 	qt_flushOutBuffer();
 }
diff --git a/src/qtterminal/qt_term.h b/src/qtterminal/qt_term.h
index e3deaa9..35637de 100644
--- a/src/qtterminal/qt_term.h
+++ b/src/qtterminal/qt_term.h
@@ -90,7 +90,7 @@ void qt_hypertext(int type, const char *text);
 #ifdef EAM_BOXED_TEXT
 void qt_boxed_text(unsigned int x, unsigned int y, int option);
 #endif
-void qt_modify_plots(unsigned int ops);
+void qt_modify_plots(unsigned int ops, int plotno);
 
 #ifdef __cplusplus
 }
diff --git a/src/save.c b/src/save.c
index 6118fec..d37042b 100644
--- a/src/save.c
+++ b/src/save.c
@@ -1,5 +1,5 @@
 #ifndef lint
-static char *RCSid() { return RCSid("$Id: save.c,v 1.256 2014/08/16 00:12:30 sfeam Exp $"); }
+static char *RCSid() { return RCSid("$Id: save.c,v 1.256.2.7 2014/11/08 04:52:25 sfeam Exp $"); }
 #endif
 
 /* GNUPLOT - save.c */
@@ -57,7 +57,6 @@ static char *RCSid() { return RCSid("$Id: save.c,v 1.256 2014/08/16 00:12:30 sfe
 static void save_functions__sub __PROTO((FILE *));
 static void save_variables__sub __PROTO((FILE *));
 static void save_tics __PROTO((FILE *, AXIS_INDEX));
-static void save_position __PROTO((FILE *, struct position *, TBOOLEAN offset));
 static void save_zeroaxis __PROTO((FILE *,AXIS_INDEX));
 static void save_set_all __PROTO((FILE *));
 
@@ -101,6 +100,8 @@ save_all(FILE *fp)
 	save_set_all(fp);
 	save_functions__sub(fp);
 	save_variables__sub(fp);
+	if (df_filename)
+	    fprintf(fp, "## Last datafile plotted: \"%s\"\n", df_filename);
 	fprintf(fp, "%s\n", replot_line);
 	if (wri_to_fil_last_fit_cmd(NULL)) {
 	    fputs("## ", fp);
@@ -219,9 +220,6 @@ set bar %f %s\n",
 
     for (axis = FIRST_AXES; axis < LAST_REAL_AXIS; axis++) {
 	if (axis == SECOND_Z_AXIS) continue;
-	if (strlen(axis_array[axis].timefmt))
-	    fprintf(fp, "set timefmt %s \"%s\"\n", axis_name(axis),
-		conv_text(axis_array[axis].timefmt));
 	if (axis == COLOR_AXIS) continue;
 	fprintf(fp, "set %sdata %s\n", axis_name(axis),
 		axis_array[axis].datatype == DT_TIMEDATE ? "time" :
@@ -300,9 +298,12 @@ set bar %f %s\n",
     }
     fprintf(fp, "\n");
 
-#define SAVE_FORMAT(axis)						\
-    fprintf(fp, "set format %s \"%s\"\n", axis_name(axis),	\
-	    conv_text(axis_array[axis].formatstring));
+#define SAVE_FORMAT(axis)					\
+    fprintf(fp, "set format %s \"%s\" %s\n", axis_name(axis),	\
+	    conv_text(axis_array[axis].formatstring),		\
+	    axis_array[axis].tictype == DT_DMS ? "geographic" :	\
+	    axis_array[axis].tictype == DT_TIMEDATE ? "timedate" : \
+	    "");
     SAVE_FORMAT(FIRST_X_AXIS );
     SAVE_FORMAT(FIRST_Y_AXIS );
     SAVE_FORMAT(SECOND_X_AXIS);
@@ -312,6 +313,8 @@ set bar %f %s\n",
     SAVE_FORMAT(POLAR_AXIS );
 #undef SAVE_FORMAT
 
+    fprintf(fp, "set timefmt \"%s\"\n", timefmt);
+
     fprintf(fp, "set angles %s\n",
 	    (ang2rad == 1.0) ? "radians" : "degrees");
 
@@ -475,7 +478,7 @@ set bar %f %s\n",
 	if (this_label->noenhanced)
 	    fprintf(fp, " noenhanced");
 	save_textcolor(fp, &(this_label->textcolor));
-	if (this_label->lp_properties.pointflag == 0)
+	if ((this_label->lp_properties.flags & LP_SHOW_POINTS) == 0)
 	    fprintf(fp, " nopoint");
 	else {
 	    fprintf(fp, " point");
@@ -1047,6 +1050,7 @@ set origin %g,%g\n",
 	fprintf(fp, " wrap %i", fit_wrap);
     else
 	fprintf(fp, " nowrap");
+    fprintf(fp, " v%i", fit_v4compatible ? 4 : 5);
     fputc('\n', fp);
 }
 
@@ -1102,7 +1106,7 @@ save_tics(FILE *fp, AXIS_INDEX axis)
 	}
     case TIC_SERIES:
 	if (axis_array[axis].ticdef.def.series.start != -VERYLARGE) {
-	    SAVE_NUM_OR_TIME(fp,
+	    save_num_or_time_input(fp,
 			     (double) axis_array[axis].ticdef.def.series.start,
 			     axis);
 	    putc(',', fp);
@@ -1110,7 +1114,7 @@ save_tics(FILE *fp, AXIS_INDEX axis)
 	fprintf(fp, "%g", axis_array[axis].ticdef.def.series.incr);
 	if (axis_array[axis].ticdef.def.series.end != VERYLARGE) {
 	    putc(',', fp);
-	    SAVE_NUM_OR_TIME(fp,
+	    save_num_or_time_input(fp,
 			     (double) axis_array[axis].ticdef.def.series.end,
 			     axis);
 	}
@@ -1124,6 +1128,9 @@ save_tics(FILE *fp, AXIS_INDEX axis)
     if (axis_array[axis].ticdef.font && *axis_array[axis].ticdef.font)
 	fprintf(fp, " font \"%s\"", axis_array[axis].ticdef.font);
 
+    if (axis_array[axis].ticdef.enhanced == FALSE)
+	fprintf(fp, " noenhanced");
+
     if (axis_array[axis].ticdef.textcolor.type != TC_DEFAULT)
 	save_textcolor(fp, &axis_array[axis].ticdef.textcolor);
 
@@ -1139,7 +1146,7 @@ save_tics(FILE *fp, AXIS_INDEX axis)
 		continue;
 	    if (t->label)
 		fprintf(fp, "\"%s\" ", conv_text(t->label));
-	    SAVE_NUM_OR_TIME(fp, (double) t->position, axis);
+	    save_num_or_time_input(fp, (double) t->position, axis);
 	    if (t->level)
 		fprintf(fp, " %d", t->level);
 	    if (t->next) {
@@ -1152,6 +1159,21 @@ save_tics(FILE *fp, AXIS_INDEX axis)
 }
 
 void
+save_num_or_time_input(FILE *fp, double x, AXIS_INDEX axis)
+{
+    if (axis_array[axis].datatype == DT_TIMEDATE) {
+	char s[80];
+
+	putc('"', fp);
+	gstrftime(s,80,timefmt,(double)(x));
+	fputs(conv_text(s), fp);
+	putc('"', fp);
+    } else {
+	fprintf(fp,"%#g",x);
+    }
+}
+
+void
 save_style_parallel(FILE *fp)
 {
     fprintf(fp, "set style parallel %s ",
@@ -1160,7 +1182,7 @@ save_style_parallel(FILE *fp)
     fprintf(fp, "\n");
 }
 
-static void
+void
 save_position(FILE *fp, struct position *pos, TBOOLEAN offset)
 {
     assert(first_axes == 0 && second_axes == 1 && graph == 2 && screen == 3 &&
@@ -1172,10 +1194,36 @@ save_position(FILE *fp, struct position *pos, TBOOLEAN offset)
 	fprintf(fp, " offset ");
     }
 
+    /* Save in time coordinates if appropriate */
+    if (pos->scalex == first_axes) {
+	save_num_or_time_input(fp, pos->x, FIRST_X_AXIS);
+	fprintf(fp, ", ");
+    } else {
+	fprintf(fp, "%s%g, ", coord_msg[pos->scalex], pos->x);
+    }
+
+    if (pos->scaley == first_axes) {
+	if (pos->scaley != pos->scalex) fprintf(fp, "first ");
+	save_num_or_time_input(fp, pos->y, FIRST_Y_AXIS);
+	fprintf(fp, ", ");
+    } else {
+	fprintf(fp, "%s%g, ", 
+	    pos->scaley == pos->scalex ? "" : coord_msg[pos->scaley], pos->y);
+    }
+
+    if (pos->scalez == first_axes) {
+	if (pos->scalez != pos->scaley) fprintf(fp, "first ");
+	save_num_or_time_input(fp, pos->z, FIRST_Z_AXIS);
+    } else {
+	fprintf(fp, "%s%g", 
+	    pos->scalez == pos->scaley ? "" : coord_msg[pos->scalez], pos->z);
+    }
+#if (0) /* v4 code */
     fprintf(fp, "%s%g, %s%g, %s%g",
 	    pos->scalex == first_axes ? "" : coord_msg[pos->scalex], pos->x,
 	    pos->scaley == pos->scalex ? "" : coord_msg[pos->scaley], pos->y,
 	    pos->scalez == pos->scaley ? "" : coord_msg[pos->scalez], pos->z);
+#endif
 }
 
 
@@ -1197,30 +1245,30 @@ save_range(FILE *fp, AXIS_INDEX axis)
 	fprintf(fp, "set paxis %d range [ ", axis-PARALLEL_AXES+1);
     if (axis_array[axis].set_autoscale & AUTOSCALE_MIN) {
 	if (axis_array[axis].min_constraint & CONSTRAINT_LOWER ) {
-	    SAVE_NUM_OR_TIME(fp, axis_array[axis].min_lb, axis);
+	    save_num_or_time_input(fp, axis_array[axis].min_lb, axis);
 	    fputs(" < ", fp);
 	}
 	putc('*', fp);
 	if (axis_array[axis].min_constraint & CONSTRAINT_UPPER ) {
 	    fputs(" < ", fp);
-	    SAVE_NUM_OR_TIME(fp, axis_array[axis].min_ub, axis);
+	    save_num_or_time_input(fp, axis_array[axis].min_ub, axis);
 	}
     } else {
-	SAVE_NUM_OR_TIME(fp, axis_array[axis].set_min, axis);
+	save_num_or_time_input(fp, axis_array[axis].set_min, axis);
     }
     fputs(" : ", fp);
     if (axis_array[axis].set_autoscale & AUTOSCALE_MAX) {
 	if (axis_array[axis].max_constraint & CONSTRAINT_LOWER ) {
-	    SAVE_NUM_OR_TIME(fp, axis_array[axis].max_lb, axis);
+	    save_num_or_time_input(fp, axis_array[axis].max_lb, axis);
 	    fputs(" < ", fp);
 	}
 	putc('*', fp);
 	if (axis_array[axis].max_constraint & CONSTRAINT_UPPER ) {
 	    fputs(" < ", fp);
-	    SAVE_NUM_OR_TIME(fp, axis_array[axis].max_ub, axis);
+	    save_num_or_time_input(fp, axis_array[axis].max_ub, axis);
 	}
     } else {
-	SAVE_NUM_OR_TIME(fp, axis_array[axis].set_max, axis);
+	save_num_or_time_input(fp, axis_array[axis].set_max, axis);
     }
 
     fprintf(fp, " ] %sreverse %swriteback",
@@ -1234,11 +1282,11 @@ save_range(FILE *fp, AXIS_INDEX axis)
 	/* add current (hidden) range as comments */
 	fputs("  # (currently [", fp);
 	if (axis_array[axis].set_autoscale & AUTOSCALE_MIN) {
-	    SAVE_NUM_OR_TIME(fp, axis_array[axis].min, axis);
+	    save_num_or_time_input(fp, axis_array[axis].min, axis);
 	}
 	putc(':', fp);
 	if (axis_array[axis].set_autoscale & AUTOSCALE_MAX) {
-	    SAVE_NUM_OR_TIME(fp, axis_array[axis].max, axis);
+	    save_num_or_time_input(fp, axis_array[axis].max, axis);
 	}
 	fputs("] )\n", fp);
     } else
@@ -1451,6 +1499,10 @@ save_data_func_style(FILE *fp, const char *which, enum PLOT_STYLE style)
 
 void save_dashtype(FILE *fp, int d_type, const t_dashtype *dt)
 {
+    /* this is indicated by LT_AXIS (lt 0) instead */
+    if (d_type == DASHTYPE_AXIS)
+	return;
+
     fprintf(fp, " dashtype");
     if (d_type == DASHTYPE_CUSTOM) {
 	if (dt->dstring[0] != '\0')
@@ -1495,7 +1547,10 @@ save_linetype(FILE *fp, lp_style_type *lp, TBOOLEAN show_point)
     save_dashtype(fp, lp->d_type, &lp->custom_dash_pattern);
 
     if (show_point) {
-	fprintf(fp, " pointtype %d", lp->p_type + 1);
+	if (lp->p_type == PT_CHARACTER)
+	    fprintf(fp, " pointtype \"%s\"", (char *)(&lp->p_char));
+	else
+	    fprintf(fp, " pointtype %d", lp->p_type + 1);
 	if (lp->p_size == PTSZ_VARIABLE)
 	    fprintf(fp, " pointsize variable");
 	else if (lp->p_size == PTSZ_DEFAULT)
diff --git a/src/save.h b/src/save.h
index 2356052..b4de27f 100644
--- a/src/save.h
+++ b/src/save.h
@@ -1,5 +1,5 @@
 /*
- * $Id: save.h,v 1.18 2014/03/17 16:26:57 juhaszp Exp $
+ * $Id: save.h,v 1.18.2.1 2014/11/08 04:52:25 sfeam Exp $
  */
 
 /* GNUPLOT - save.h */
@@ -54,6 +54,7 @@ void save_variables __PROTO((FILE *fp));
 void save_set __PROTO((FILE *fp));
 void save_term __PROTO((FILE *fp));
 void save_all __PROTO((FILE *fp));
+void save_position __PROTO((FILE *, struct position *, TBOOLEAN));
 void save_range __PROTO((FILE *, AXIS_INDEX));
 void save_textcolor __PROTO((FILE *, const struct t_colorspec *));
 void save_pm3dcolor __PROTO((FILE *, const struct t_colorspec *));
@@ -67,5 +68,6 @@ void save_style_parallel __PROTO((FILE *));
 void save_data_func_style __PROTO((FILE *, const char *, enum PLOT_STYLE));
 void save_linetype __PROTO((FILE *, lp_style_type *, TBOOLEAN));
 void save_dashtype __PROTO((FILE *, int, const t_dashtype *));
+void save_num_or_time_input __PROTO((FILE *, double x, AXIS_INDEX axis));
 
 #endif /* GNUPLOT_SAVE_H */
diff --git a/src/set.c b/src/set.c
index 144d5ee..1b11dcb 100644
--- a/src/set.c
+++ b/src/set.c
@@ -1,5 +1,5 @@
 #ifndef lint
-static char *RCSid() { return RCSid("$Id: set.c,v 1.459.2.1 2014/08/21 23:06:55 sfeam Exp $"); }
+static char *RCSid() { return RCSid("$Id: set.c,v 1.459.2.6 2014/11/08 04:52:25 sfeam Exp $"); }
 #endif
 
 /* GNUPLOT - set.c */
@@ -1868,6 +1868,12 @@ set_fit()
 	} else if (equals(c_token, "nowrap")) {
 	    c_token++;
 	    fit_wrap = 0;
+	} else if (equals(c_token, "v4")) {
+	    c_token++;
+	    fit_v4compatible = TRUE;
+	} else if (equals(c_token, "v5")) {
+	    c_token++;
+	    fit_v4compatible = FALSE;
 	} else {
 	    int_error(c_token, "unrecognized option --- see `help set fit`");
 	}
@@ -1880,52 +1886,57 @@ void
 set_format()
 {
     TBOOLEAN set_for_axis[AXIS_ARRAY_SIZE] = AXIS_ARRAY_INITIALIZER(FALSE);
-    int axis;
+    AXIS_INDEX axis;
+    char *format;
+    td_type tictype = DT_UNINITIALIZED;
 
     c_token++;
     if ((axis = lookup_table(axisname_tbl, c_token)) >= 0) {
 	set_for_axis[axis] = TRUE;
 	c_token++;
     } else if (equals(c_token,"xy") || equals(c_token,"yx")) {
-	set_for_axis[FIRST_X_AXIS]
-	    = set_for_axis[FIRST_Y_AXIS]
-	    = TRUE;
+	set_for_axis[FIRST_X_AXIS] = set_for_axis[FIRST_Y_AXIS] = TRUE;
 	c_token++;
     } else {
-	/* Assume he wants all */
+	/* Set all of them */
 	for (axis = 0; axis < AXIS_ARRAY_SIZE; axis++)
 	    set_for_axis[axis] = TRUE;
     }
 
     if (END_OF_COMMAND) {
-	SET_DEFFORMAT(FIRST_X_AXIS , set_for_axis);
-	SET_DEFFORMAT(FIRST_Y_AXIS , set_for_axis);
-	SET_DEFFORMAT(FIRST_Z_AXIS , set_for_axis);
-	SET_DEFFORMAT(SECOND_X_AXIS, set_for_axis);
-	SET_DEFFORMAT(SECOND_Y_AXIS, set_for_axis);
-	SET_DEFFORMAT(COLOR_AXIS   , set_for_axis);
-	SET_DEFFORMAT(POLAR_AXIS   , set_for_axis);
-    } else {
-	char *format = try_to_get_string();
-	if (!format)
-	    int_error(c_token, "expecting format string");
-
-#define SET_FORMATSTRING(axis)							\
-	if (set_for_axis[axis]) {						\
-		free(axis_array[axis].formatstring);				\
-		axis_array[axis].formatstring = gp_strdup(format);		\
+	for (axis = FIRST_AXES; axis <= POLAR_AXIS; axis++) {
+	    if (set_for_axis[axis]) {
+		free(axis_array[axis].formatstring);
+		axis_array[axis].formatstring = gp_strdup(DEF_FORMAT);
+		axis_array[axis].tictype = DT_NORMAL;
+	    }
 	}
-	SET_FORMATSTRING(FIRST_X_AXIS);
-	SET_FORMATSTRING(FIRST_Y_AXIS);
-	SET_FORMATSTRING(FIRST_Z_AXIS);
-	SET_FORMATSTRING(SECOND_X_AXIS);
-	SET_FORMATSTRING(SECOND_Y_AXIS);
-	SET_FORMATSTRING(COLOR_AXIS);
-	SET_FORMATSTRING(POLAR_AXIS);
-#undef SET_FORMATSTRING
+	return;
+    }
+
+    if (!(format = try_to_get_string()))
+	int_error(c_token, "expecting format string");
+
+    if (almost_equals(c_token,"time$date")) {
+	tictype = DT_TIMEDATE;
+	c_token++;
+    } else if (almost_equals(c_token,"geo$graphic")) {
+	tictype = DT_DMS;
+	c_token++;
+    } else if (almost_equals(c_token,"num$eric")) {
+	tictype = DT_NORMAL;
+	c_token++;
+    }
 
-	free(format);
+    for (axis = FIRST_AXES; axis <= POLAR_AXIS; axis++) {
+	if (set_for_axis[axis]) {
+	    free(axis_array[axis].formatstring);
+	    axis_array[axis].formatstring = gp_strdup(format);
+	    if (tictype != DT_UNINITIALIZED)
+		axis_array[axis].tictype = tictype;
+	}
     }
+    free(format);
 }
 
 
@@ -4816,6 +4827,14 @@ set_tics()
 		axis_array[i].ticdef.offset = default_offset;
 	} else if (almost_equals(c_token, "format")) {
 	    set_format();
+	} else if (almost_equals(c_token, "enh$anced")) {
+	    ++c_token;
+	    for (i = 0; i < AXIS_ARRAY_SIZE; ++i)
+		axis_array[i].ticdef.enhanced = TRUE;
+	} else if (almost_equals(c_token, "noenh$anced")) {
+	    ++c_token;
+	    for (i = 0; i < AXIS_ARRAY_SIZE; ++i)
+		axis_array[i].ticdef.enhanced = FALSE;
 	} else if (almost_equals(c_token, "f$ont")) {
 	    ++c_token;
 	    /* Make sure they've specified a font */
@@ -4933,35 +4952,21 @@ set_xyplane()
 /* Process 'set timefmt' command */
 /* HBB 20000507: changed this to a per-axis setting. I.e. you can now
  * have separate timefmt parse strings, different axes */
+/* V5 Oct 2014: But that was never documented, and makes little sense since
+ * the input format is a property of the data file, not the graph axis.
+ * Revert to a single global default timefmt as documented.
+ * If the default is not sufficient, use timecolumn(N,"format") on input.
+ * Use "set {axis}tics format" to control the output format.
+ */
 static void
 set_timefmt()
 {
-    int axis;
-    char *newformat = NULL;
-
     c_token++;
-    if (END_OF_COMMAND) {
-	/* set all axes to default */
-	for (axis = 0; axis < AXIS_ARRAY_SIZE; axis++) {
-	    free(axis_array[axis].timefmt);
-	    axis_array[axis].timefmt = gp_strdup(TIMEFMT);
-	}
-    } else {
-	if ((axis = lookup_table(axisname_tbl, c_token)) >= 0) {
-	    c_token++;
-	    newformat = try_to_get_string();
-	    free(axis_array[axis].timefmt);
-	    axis_array[axis].timefmt = gp_strdup(newformat);
-	} else {
-	    newformat = try_to_get_string();
-	    for (axis = 0; axis < AXIS_ARRAY_SIZE; axis++) {
-		free(axis_array[axis].timefmt);
-		axis_array[axis].timefmt = gp_strdup(newformat);
-	    }
-	}
-	if (!newformat)
-	    int_error(c_token, "time format string expected");
-	free(newformat);
+    free(timefmt);
+    timefmt = try_to_get_string();
+    if (!timefmt) {
+	timefmt = gp_strdup(TIMEFMT);
+	int_error(c_token, "expecting form for timedata input");
     }
 }
 
@@ -5133,6 +5138,9 @@ set_timedata(AXIS_INDEX axis)
 	axis_array[axis].datatype = DT_DMS;
 	c_token++;
     }
+    /* FIXME: this provides approximate backwards compatibility */
+    /*        but may be more trouble to explain than it's worth */
+    axis_array[axis].tictype = axis_array[axis].datatype;
 }
 
 
@@ -5252,43 +5260,7 @@ set_allzeroaxis()
     set_zeroaxis(FIRST_Z_AXIS);
 }
 
-/*********** Support functions for set_command ***********/
-
-/*
- * The set.c PROCESS_TIC_PROP macro has the following characteristics:
- *   (a) options must in the correct order
- *   (b) 'set xtics' (no option) resets only the interval (FREQ)
- *       {it will also negate NO_TICS, see (d)}
- *   (c) changing any property also resets the interval to automatic
- *   (d) set no[xy]tics; set [xy]tics changes border to nomirror, rather
- *       than to the default, mirror.
- *   (e) effect of 'set no[]tics; set []tics border ...' is compiler
- *       dependent;  if '!(TICS)' is evaluated first, 'border' is an
- *       undefined variable :-(
- *
- * This function replaces the macro, and introduces a new option
- * 'au$tofreq' to give somewhat different behaviour:
- *   (a) no change
- *   (b) 'set xtics' (no option) only affects NO_TICS;  'autofreq' resets
- *       the interval calulation to automatic
- *   (c) the interval mode is not affected by changing some other option
- *   (d) if NO_TICS, set []tics will restore defaults (borders, mirror
- *       where appropriate)
- *   (e) if (NO_TICS), border option is processed.
- *
- *  A 'default' option could easily be added to reset all options to
- *  the initial values - mostly book-keeping.
- *
- *  To retain tic properties after setting no[]tics may also be
- *  straightforward (save value as negative), but requires changes
- *  in other code ( e.g. for  'if (xtics)', use 'if (xtics > 0)'
- */
-
-/*    generates PROCESS_TIC_PROP strings from tic_side, e.g. "x2"
- *  STRING, NOSTRING, MONTH, NOMONTH, DAY, NODAY, MINISTRING, NOMINI
- *  "nox2t$ics"     "nox2m$tics"  "nox2d$tics"    "nomx2t$ics"
- */
-
+/* Implements 'set tics' 'set xtics' 'set ytics' etc */
 static int
 set_tic_prop(AXIS_INDEX axis)
 {
@@ -5396,6 +5368,18 @@ set_tic_prop(AXIS_INDEX axis)
 		    axis_array[axis].ticdef.font = NULL;
 		    axis_array[axis].ticdef.font = try_to_get_string();
 		}
+
+	    /* The geographic/timedate/numeric options are new in version 5 */
+	    } else if (almost_equals(c_token,"geo$graphic")) {
+		++c_token;
+		axis_array[axis].tictype = DT_DMS;
+	    } else if (almost_equals(c_token,"time$date")) {
+		++c_token;
+		axis_array[axis].tictype = DT_TIMEDATE;
+	    } else if (almost_equals(c_token,"numeric")) {
+		++c_token;
+		axis_array[axis].tictype = DT_NORMAL;
+
 	    } else if (equals(c_token,"format")) {
 		char *format;
 		++c_token;
@@ -5403,6 +5387,12 @@ set_tic_prop(AXIS_INDEX axis)
 		    int_error(c_token,"expected format");
 		free(axis_array[axis].formatstring);
 		axis_array[axis].formatstring  = format;
+	    } else if (almost_equals(c_token, "enh$anced")) {
+		++c_token;
+		axis_array[axis].ticdef.enhanced = TRUE;
+	    } else if (almost_equals(c_token, "noenh$anced")) {
+		++c_token;
+		axis_array[axis].ticdef.enhanced = FALSE;
 	    } else if (equals(c_token,"tc") ||
 		       almost_equals(c_token,"text$color")) {
 		parse_colorspec(&axis_array[axis].ticdef.textcolor,
@@ -5906,7 +5896,7 @@ parse_label_options( struct text_label *this_label, TBOOLEAN in_plot )
     struct position offset = default_offset;
     t_colorspec textcolor = {TC_DEFAULT,0,0.0};
     struct lp_style_type loc_lp = DEFAULT_LP_STYLE_TYPE;
-    loc_lp.pointflag = -2;
+    loc_lp.flags = LP_NOT_INITIALIZED;
 
    /* Now parse the label format and style options */
     while (!END_OF_COMMAND) {
@@ -6016,11 +6006,11 @@ parse_label_options( struct text_label *this_label, TBOOLEAN in_plot )
 	}
 #endif
 
-	if (!axis_label && (loc_lp.pointflag == -2 || set_hypertext)) {
+	if (!axis_label && (loc_lp.flags == LP_NOT_INITIALIZED || set_hypertext)) {
 	    if (almost_equals(c_token, "po$int")) {
 		int stored_token = ++c_token;
 		struct lp_style_type tmp_lp;
-		loc_lp.pointflag = 1;
+		loc_lp.flags = LP_SHOW_POINTS;
 		tmp_lp = loc_lp;
 		lp_parse(&tmp_lp, LP_ADHOC, TRUE);
 		if (stored_token != c_token)
@@ -6028,7 +6018,7 @@ parse_label_options( struct text_label *this_label, TBOOLEAN in_plot )
 		set_point = TRUE;
 		continue;
 	    } else if (almost_equals(c_token, "nopo$int")) {
-		loc_lp.pointflag = 0;
+		loc_lp.flags = 0;
 		c_token++;
 		continue;
 	    }
@@ -6086,7 +6076,7 @@ parse_label_options( struct text_label *this_label, TBOOLEAN in_plot )
 	    this_label->font = font;
 	if (set_textcolor)
 	    this_label->textcolor = textcolor;
-	if (loc_lp.pointflag >= 0)
+	if ((loc_lp.flags & LP_NOT_INITIALIZED) == 0)
 	    this_label->lp_properties = loc_lp;
 	if (set_offset)
 	    this_label->offset = offset;
diff --git a/src/setshow.h b/src/setshow.h
index ddbd78c..d09e195 100644
--- a/src/setshow.h
+++ b/src/setshow.h
@@ -1,5 +1,5 @@
 /*
- * $Id: setshow.h,v 1.50 2014/03/23 12:17:59 markisch Exp $
+ * $Id: setshow.h,v 1.50.2.1 2014/11/08 04:52:26 sfeam Exp $
  */
 
 /* GNUPLOT - setshow.h */
@@ -44,23 +44,6 @@
 #include "gadgets.h"
 #include "term_api.h"
 
-#define PROGRAM "G N U P L O T"  /* FIXME: move to show.c! */
-
-#define SAVE_NUM_OR_TIME(fp, x, axis)				\
-do{								\
-    if (axis_array[axis].datatype == DT_TIMEDATE) {		\
-	char s[80];						\
-								\
-	putc('"', fp);						\
-	gstrftime(s,80,axis_array[axis].timefmt,(double)(x));	\
-	fputs(conv_text(s), fp);				\
-	putc('"', fp);						\
-    } else {							\
-	fprintf(fp,"%#g",x);					\
-    }								\
-} while(0)
-
-
 /* The set and show commands, in setshow.c */
 void set_command __PROTO((void));
 void unset_command __PROTO((void));
diff --git a/src/show.c b/src/show.c
index a741fed..8347beb 100644
--- a/src/show.c
+++ b/src/show.c
@@ -1,5 +1,5 @@
 #ifndef lint
-static char *RCSid() { return RCSid("$Id: show.c,v 1.326 2014/07/23 05:45:49 sfeam Exp $"); }
+static char *RCSid() { return RCSid("$Id: show.c,v 1.326.2.4 2014/11/08 04:52:26 sfeam Exp $"); }
 #endif
 
 /* GNUPLOT - show.c */
@@ -176,12 +176,12 @@ static void show_functions __PROTO((void));
 
 static int var_show_all = 0;
 
-/* following code segment appears over and over again */
-
-#define SHOW_NUM_OR_TIME(x, axis) SAVE_NUM_OR_TIME(stderr, x, axis)
-
+/* following code segments appear over and over again */
+#define SHOW_NUM_OR_TIME(x, axis) save_num_or_time_input(stderr, x, axis)
 #define SHOW_ALL_NL { if (!var_show_all) (void) putc('\n',stderr); }
 
+#define PROGRAM "G N U P L O T"
+
 /******* The 'show' command *******/
 void
 show_command()
@@ -1439,8 +1439,11 @@ show_format()
 
     fprintf(stderr, "\ttic format is:\n");
 #define SHOW_FORMAT(_axis)						\
-    fprintf(stderr, "\t  %s-axis: \"%s\"\n", axis_name(_axis),	\
-	    conv_text(axis_array[_axis].formatstring));
+    fprintf(stderr, "\t  %s-axis: \"%s\"%s\n", axis_name(_axis),	\
+	    conv_text(axis_array[_axis].formatstring),			\
+	    axis_array[_axis].tictype == DT_DMS ? " geographic" :	\
+	    axis_array[_axis].tictype == DT_TIMEDATE ? " time" :	\
+	    "");
     SHOW_FORMAT(FIRST_X_AXIS );
     SHOW_FORMAT(FIRST_Y_AXIS );
     SHOW_FORMAT(SECOND_X_AXIS);
@@ -1749,7 +1752,7 @@ show_label(int tag)
 		save_textcolor(stderr, &this_label->textcolor);
 	    if (this_label->noenhanced)
 		fprintf(stderr, " noenhanced");
-	    if (this_label->lp_properties.pointflag == 0)
+	    if ((this_label->lp_properties.flags & LP_SHOW_POINTS) == 0)
 		fprintf(stderr, " nopoint");
 	    else {
 		fprintf(stderr, " point with color of");
@@ -1961,18 +1964,9 @@ show_key()
 void
 show_position(struct position *pos)
 {
-    static const char *msg[] = { "(first axes) ", "(second axes) ",
-				 "(graph units) ", "(screen units) ",
-				 "(character units) "};
-
-    assert(first_axes == 0 && second_axes == 1 && graph == 2 && screen == 3 &&
-	   character == 4);
-
-    fprintf(stderr, "(%s%g, %s%g, %s%g)",
-	    pos->scalex == first_axes ? "" : msg[pos->scalex], pos->x,
-	    pos->scaley == pos->scalex ? "" : msg[pos->scaley], pos->y,
-	    pos->scalez == pos->scaley ? "" : msg[pos->scalez], pos->z);
-
+    fprintf(stderr,"(");
+    save_position(stderr, pos, FALSE);
+    fprintf(stderr,")");
 }
 
 
@@ -2640,6 +2634,10 @@ show_fit()
     if (d > 0.)
 	fprintf(stderr, "\tfit will change lambda by a factor of %g\n", d);
 
+    if (fit_v4compatible)
+	fprintf(stderr, "\tfit command syntax is backwards compatible to version 4\n");
+    else
+	fprintf(stderr, "\tfit will default to `unitweights` if no `error`keyword is given on the command line.\n");
     fprintf(stderr, "\tfit can run the following command when interrupted:\n\t\t'%s'\n", getfitscript());
     v = get_udv_by_name("GPVAL_LAST_FIT");
     if (v != NULL && !v->udv_undef)
@@ -2899,8 +2897,6 @@ show_range(AXIS_INDEX axis)
     SHOW_ALL_NL;
     if (axis_array[axis].datatype == DT_TIMEDATE)
 	fprintf(stderr, "\tset %sdata time\n", axis_name(axis));
-    else if (axis_array[axis].datatype == DT_DMS)
-	fprintf(stderr, "\tset %sdata geographic\n", axis_name(axis));
     fprintf(stderr,"\t");
     save_range(stderr, axis);
 }
@@ -2960,7 +2956,7 @@ show_data_is_timedate(AXIS_INDEX axis)
     SHOW_ALL_NL;
     fprintf(stderr, "\t%s is set to %s\n", axis_name(axis),
 	    axis_array[axis].datatype == DT_TIMEDATE ? "time" :
-	    axis_array[axis].datatype == DT_DMS ? "geographic" :
+	    axis_array[axis].datatype == DT_DMS ? "geographic" :  /* obsolete */
 	    "numerical");
 }
 
@@ -2969,24 +2965,9 @@ show_data_is_timedate(AXIS_INDEX axis)
 static void
 show_timefmt()
 {
-    int axis;
-
     SHOW_ALL_NL;
-
-    if ((axis = lookup_table(axisname_tbl, c_token)) >= 0) {
-	c_token++;
-	fprintf(stderr, "\tread format for time on %s axis is \"%s\"\n",
-		axis_name(axis),
-		conv_text(axis_array[axis].timefmt));
-    } else {
-        /* show all currently active time axes' formats: */
-	for (axis = 0; axis<AXIS_ARRAY_SIZE; axis++)
-	    if (axis_array[axis].datatype == DT_TIMEDATE)
-		fprintf(stderr,
-			"\tread format for time on %s axis is \"%s\"\n",
-			axis_name(axis),
-			conv_text(axis_array[axis].timefmt));
-    }
+    fprintf(stderr, "Default format for reading time data is \"%s\"\n",
+	timefmt);
 }
 
 /* process 'show link' command */
@@ -3344,6 +3325,12 @@ show_ticdef(AXIS_INDEX axis)
     } else
         fputs("justified automatically, ", stderr);
     fprintf(stderr, "format \"%s\"", ticfmt);
+    fprintf(stderr, "%s", 
+	axis_array[axis].tictype == DT_DMS ? " geographic" :
+	axis_array[axis].tictype == DT_TIMEDATE ? " timedate" :
+	"");
+    if (axis_array[axis].ticdef.enhanced == FALSE)
+	fprintf(stderr,"  noenhanced");
     if (axis_array[axis].tic_rotate) {
 	fprintf(stderr," rotated");
 	fprintf(stderr," by %d",axis_array[axis].tic_rotate);
diff --git a/src/stats.c b/src/stats.c
index 3f10054..ea08265 100644
--- a/src/stats.c
+++ b/src/stats.c
@@ -1,5 +1,5 @@
 #ifndef lint
-static char *RCSid() { return RCSid("$Id: stats.c,v 1.14 2014/05/27 22:12:54 sfeam Exp $"); }
+static char *RCSid() { return RCSid("$Id: stats.c,v 1.14.2.3 2014/10/16 16:46:19 sfeam Exp $"); }
 #endif
 
 /* GNUPLOT - stats.c */
@@ -100,6 +100,7 @@ struct sgl_column_stats {
     double mean;
     double adev;
     double stddev;
+    double ssd;		/* sample standard deviation */
     double skewness;
     double kurtosis;
 
@@ -173,7 +174,7 @@ analyze_file( long n, int outofrange, int invalid, int blank, int dblblank )
 }
 
 static struct sgl_column_stats
-analyze_sgl_column( double *data, long n, long nr )
+analyze_sgl_column( double *data, long n, long nc )
 {
     struct sgl_column_stats res;
 
@@ -193,9 +194,9 @@ analyze_sgl_column( double *data, long n, long nr )
     struct pair *tmp = (struct pair *)gp_alloc( n*sizeof(struct pair),
 					      "analyze_sgl_column" );
 
-    if ( nr > 0 ) {
-	res.sx = nr;
-	res.sy = n / nr;
+    if ( nc > 0 ) {
+	res.sx = nc;
+	res.sy = n / nc;
     } else {
 	res.sx = 0;
 	res.sy = n;
@@ -205,7 +206,7 @@ analyze_sgl_column( double *data, long n, long nr )
     for( i=0; i<n; i++ ) {
 	s  += data[i];
 	s2 += data[i]*data[i];
-	if ( nr > 0 ) {
+	if ( nc > 0 ) {
 	    cx += data[i]*(i % res.sx);
 	    cy += data[i]*(i / res.sx);
 	}
@@ -224,8 +225,9 @@ analyze_sgl_column( double *data, long n, long nr )
 	d3 += t*t*t;
 	d4 += t*t*t*t;
     }
-    /* two-pass algorithm for variance */
-    var = (d2 - d * d / n) / n;  /* population, not sample */
+
+    /* population (not sample) variance, stddev, skew, kurtosis */
+    var = (d2 - d * d / n) / n;
     res.stddev = sqrt(var);
     res.adev = ad / n;
     if (var != 0.0) {
@@ -240,6 +242,9 @@ analyze_sgl_column( double *data, long n, long nr )
     res.skewness_err = sqrt(6.0 / n);
     res.kurtosis_err = sqrt(24.0 / n);
 
+    /* sample standard deviation */
+    res.ssd = res.stddev * sqrt((double)(n) / (double)(n-1));
+
     for( i=0; i<n; i++ ) {
 	tmp[i].val = data[i];
 	tmp[i].index = i;
@@ -400,6 +405,7 @@ sgl_column_output_nonformat( struct sgl_column_stats s, char *x )
 {
     fprintf( print_out, "%s%s\t%f\n", "mean",     x, s.mean );
     fprintf( print_out, "%s%s\t%f\n", "stddev",   x, s.stddev );
+    fprintf( print_out, "%s%s\t%f\n", "ssd",      x, s.ssd );
     fprintf( print_out, "%s%s\t%f\n", "skewness", x, s.skewness );
     fprintf( print_out, "%s%s\t%f\n", "kurtosis", x, s.kurtosis );
     fprintf( print_out, "%s%s\t%f\n", "adev",     x, s.adev);
@@ -421,10 +427,10 @@ sgl_column_output_nonformat( struct sgl_column_stats s, char *x )
 
     /* If data set is matrix */
     if ( s.sx > 0 ) {
-	fprintf( print_out, "%s%s\t%ld\n","index_min_x",  x, (s.min.index) / s.sx );
-	fprintf( print_out, "%s%s\t%ld\n","index_min_y",  x, (s.min.index) % s.sx );
-	fprintf( print_out, "%s%s\t%ld\n","index_max_x",  x, (s.max.index) / s.sx );
-	fprintf( print_out, "%s%s\t%ld\n","index_max_y",  x, (s.max.index) % s.sx );
+	fprintf( print_out, "%s%s\t%ld\n","index_min_x",  x, (s.min.index) % s.sx );
+	fprintf( print_out, "%s%s\t%ld\n","index_min_y",  x, (s.min.index) / s.sx );
+	fprintf( print_out, "%s%s\t%ld\n","index_max_x",  x, (s.max.index) % s.sx );
+	fprintf( print_out, "%s%s\t%ld\n","index_max_y",  x, (s.max.index) / s.sx );
 	fprintf( print_out, "%s%s\t%f\n","cog_x",  x, s.cog_x );
 	fprintf( print_out, "%s%s\t%f\n","cog_y",  x, s.cog_y );
     } else {
@@ -462,6 +468,7 @@ sgl_column_output( struct sgl_column_stats s, long n )
 
     fprintf( print_out, "  Mean:          %s\n", fmt( buf, s.mean ) );
     fprintf( print_out, "  Std Dev:       %s\n", fmt( buf, s.stddev ) );
+    fprintf( print_out, "  Sample StdDev: %s\n", fmt( buf, s.ssd ) );
     fprintf( print_out, "  Skewness:      %s\n", fmt( buf, s.skewness ) );
     fprintf( print_out, "  Kurtosis:      %s\n", fmt( buf, s.kurtosis ) );
     fprintf( print_out, "  Avg Dev:       %s\n", fmt( buf, s.adev ) );
@@ -478,9 +485,9 @@ sgl_column_output( struct sgl_column_stats s, long n )
     /* For matrices, the quartiles and the median do not make too much sense */
     if ( s.sx > 0 ) {
 	fprintf( print_out, "  Minimum:       %s [%*ld %ld ]\n", fmt(buf, s.min.val), width,
-	     (s.min.index) / s.sx, (s.min.index) % s.sx);
+	     (s.min.index) % s.sx, (s.min.index) / s.sx);
 	fprintf( print_out, "  Maximum:       %s [%*ld %ld ]\n", fmt(buf, s.max.val), width,
-	     (s.max.index) / s.sx, (s.max.index) % s.sx);
+	     (s.max.index) % s.sx, (s.max.index) / s.sx);
 	fprintf( print_out, "  COG:           %s %s\n", fmt(buf, s.cog_x), fmt(buf2, s.cog_y) );
     } else {
 	/* FIXME:  The "position" are randomly selected from a non-unique set. Bad! */
@@ -533,6 +540,7 @@ two_column_output( struct sgl_column_stats x,
     fprintf( print_out, "* COLUMNS:\n" );
     fprintf( print_out, "  Mean:          %s %s %s\n", fmt(bfx, x.mean),   blank, fmt(bfy, y.mean) );
     fprintf( print_out, "  Std Dev:       %s %s %s\n", fmt(bfx, x.stddev), blank, fmt(bfy, y.stddev ) );
+    fprintf( print_out, "  Sample StdDev: %s %s %s\n", fmt(bfx, x.ssd), blank, fmt(bfy, y.ssd ) );
     fprintf( print_out, "  Skewness:      %s %s %s\n", fmt(bfx, x.skewness), blank, fmt(bfy, y.skewness) );
     fprintf( print_out, "  Kurtosis:      %s %s %s\n", fmt(bfx, x.kurtosis), blank, fmt(bfy, y.kurtosis) );
     fprintf( print_out, "  Avg Dev:       %s %s %s\n", fmt(bfx, x.adev), blank, fmt(bfy, y.adev ) );
@@ -624,6 +632,7 @@ sgl_column_variables( struct sgl_column_stats s, char *prefix, char *suffix )
 {
     create_and_set_var( s.mean,     prefix, "mean",     suffix );
     create_and_set_var( s.stddev,   prefix, "stddev",   suffix );
+    create_and_set_var( s.ssd,      prefix, "ssd",      suffix );
     create_and_set_var( s.skewness, prefix, "skewness", suffix );
     create_and_set_var( s.kurtosis, prefix, "kurtosis", suffix );
     create_and_set_var( s.adev,     prefix, "adev",     suffix );
@@ -641,10 +650,12 @@ sgl_column_variables( struct sgl_column_stats s, char *prefix, char *suffix )
 
     /* If data set is matrix */
     if ( s.sx > 0 ) {
-	create_and_set_var( (s.min.index) / s.sx, prefix, "index_min_x", suffix );
-	create_and_set_var( (s.min.index) % s.sx, prefix, "index_min_y", suffix );
-	create_and_set_var( (s.max.index) / s.sx, prefix, "index_max_x", suffix );
-	create_and_set_var( (s.max.index) % s.sx, prefix, "index_max_y", suffix );
+	create_and_set_var( (s.min.index) % s.sx, prefix, "index_min_x", suffix );
+	create_and_set_var( (s.min.index) / s.sx, prefix, "index_min_y", suffix );
+	create_and_set_var( (s.max.index) % s.sx, prefix, "index_max_x", suffix );
+	create_and_set_var( (s.max.index) / s.sx, prefix, "index_max_y", suffix );
+	create_and_set_var( s.sx, prefix, "size_x", suffix );
+	create_and_set_var( s.sy, prefix, "size_y", suffix );
     } else {
 	create_and_set_var( s.median,         prefix, "median",      suffix );
 	create_and_set_var( s.lower_quartile, prefix, "lo_quartile", suffix );
@@ -705,7 +716,6 @@ statsrequest(void)
 {
     int i;
     int columns;
-    int columnsread;
     double v[2];
     static char *file_name = NULL;
 
@@ -743,7 +753,6 @@ statsrequest(void)
     parse_range(FIRST_Y_AXIS);
 
     /* Initialize */
-    columnsread = 2;
     invalid = 0;          /* number of missing/invalid records */
     blanks = 0;           /* number of blank lines */
     doubleblanks = 0;     /* number of repeated blank lines */
@@ -810,7 +819,7 @@ statsrequest(void)
 	    int_error(NO_CARET, "Can't read data file");
 
 	if (columns > 2 )
-	    int_error(c_token, "Need 0 to 2 using specs for stats command");
+	    int_error(c_token, "stats command can handle only 2 columns of data");
 
 	/* If the user has set an explicit locale for numeric input, apply it
 	   here so that it affects data fields read from the input file. */
@@ -838,19 +847,13 @@ statsrequest(void)
 	   so that "columns" will be 0, 1, or 2 (no using, using 1, using 1:2)
 	 - readline always returns the same number of columns (for us: 1 or 2)
 	 - using 1:2 = return two columns, skipping lines w/ bad data
-	 - using 1   = return sgl column (supply zeros (0) for the second col)
-	 - no using  = return two columns (first two), fail on bad data
-
-	 We need to know how many columns to process. If columns==1 or ==2
-	 (that is, if there was a using spec), all is clear and we use the
-	 value of columns.
-	 But: if columns is 0, then we need to figure out the number of cols
-	 read from the return value of readline. If readline ever returns
-	 1, we take that; only if it always returns 2 do we assume two cols.
+	 - using 1   = return single column (supply zeros (0) for the second col)
+	 - no using (gnuplot version 5)
+		     = first two columns if both are present on the first line of data
+		       else first column only
 	 */
 
 	while( (i = df_readline(v, 2)) != DF_EOF ) {
-	    columnsread = ( i > columnsread ? i : columnsread );
 
 	    if ( n >= max_n ) {
 		max_n = (max_n * 3) / 2; /* increase max_n by factor of 1.5 */
@@ -891,6 +894,7 @@ statsrequest(void)
 	      } else {
 		out_of_range++;
 	      }
+	      columns = 1;
 	      break;
 
 	    case 2: /* Read two columns successfully  */
@@ -902,6 +906,7 @@ statsrequest(void)
 	      } else {
 		out_of_range++;
 	      }
+	      columns = 2;
 	      break;
 	    }
 	} /* end-while : done reading file */
@@ -911,10 +916,6 @@ statsrequest(void)
 	redim_vec(&data_x, n);
 	redim_vec(&data_y, n);
 
-	/* figure out how many columns where really read... */
-	if ( columns == 0 )
-	    columns = columnsread;
-
     }  /* end of case when the data file is not a matrix */
 
     /* Now finished reading user input; return to C locale for internal use*/
@@ -966,7 +967,7 @@ statsrequest(void)
     /* Do the actual analysis */
     res_file = analyze_file( n, out_of_range, invalid, blanks, doubleblanks );
     if ( columns == 1 ) {
-	res_y = analyze_sgl_column( data_y, n, nr );
+	res_y = analyze_sgl_column( data_y, n, nc );
     }
 
     if ( columns == 2 ) {
diff --git a/src/term.c b/src/term.c
index 0734d1d..c6b75f1 100644
--- a/src/term.c
+++ b/src/term.c
@@ -1,5 +1,5 @@
 #ifndef lint
-static char *RCSid() { return RCSid("$Id: term.c,v 1.296 2014/08/03 21:52:50 sfeam Exp $"); }
+static char *RCSid() { return RCSid("$Id: term.c,v 1.296.2.1 2014/09/05 21:50:58 sfeam Exp $"); }
 #endif
 
 /* GNUPLOT - term.c */
@@ -616,7 +616,7 @@ term_apply_lp_properties(struct lp_style_type *lp)
     t_dashtype custom_dash_pattern = lp->custom_dash_pattern;
     t_colorspec colorspec = lp->pm3d_color;
 
-    if (lp->pointflag) {
+    if ((lp->flags & LP_SHOW_POINTS)) {
 	/* change points, too
 	 * Currently, there is no 'pointtype' function.  For points
 	 * there is a special function also dealing with (x,y) co-
@@ -2734,13 +2734,13 @@ lp_use_properties(struct lp_style_type *lp, int tag)
      */
 
     struct linestyle_def *this;
-    int save_pointflag = lp->pointflag;
+    int save_flags = lp->flags;
 
     this = first_linestyle;
     while (this != NULL) {
 	if (this->tag == tag) {
 	    *lp = this->lp_properties;
-	    lp->pointflag = save_pointflag;
+	    lp->flags = save_flags;
 	    return;
 	} else {
 	    this = this->next;
diff --git a/src/term.h b/src/term.h
index c68504c..8f7a105 100644
--- a/src/term.h
+++ b/src/term.h
@@ -1,5 +1,5 @@
 /*
- * $Id: term.h,v 1.66 2014/03/19 23:36:07 sfeam Exp $
+ * $Id: term.h,v 1.66.2.1 2014/10/01 02:40:29 sfeam Exp $
  */
 
 /* GNUPLOT - term.h */
@@ -196,9 +196,6 @@
 /* Terminals not relevant for MSDOS, MS-Windows */
 #if !(defined(MSDOS) || defined(_Windows))
 
-/* AED 512 and AED 767 graphics terminals */
-/* # include "aed.trm" */
-
 /* gpic for groff */
 #ifdef HAVE_GPIC
 # include "gpic.trm"
@@ -333,9 +330,6 @@
 /* tcl/tk with perl extensions */
 #include "tkcanvas.trm"
 
-/* Vectrix 384 printer, also Tandy colour */
-/* #include "v384.trm" */
-
 #ifndef NO_BITMAP_SUPPORT
 
 /* portable bit map */
diff --git a/src/term_api.h b/src/term_api.h
index 89ac32a..a0ccffc 100644
--- a/src/term_api.h
+++ b/src/term_api.h
@@ -1,5 +1,5 @@
 /*
- * $Id: term_api.h,v 1.134 2014/08/03 21:52:50 sfeam Exp $
+ * $Id: term_api.h,v 1.134.2.2 2014/11/12 05:20:17 sfeam Exp $
  */
 
 /* GNUPLOT - term_api.h */
@@ -57,7 +57,6 @@
 #define LT_UNDEFINED  (-5)
 #define LT_COLORFROMCOLUMN  (-6)	/* Used by hidden3d code */
 #define LT_DEFAULT    (-7)
-#define LT_SINGLECOLOR  (-8)		/* Used by hidden3d code */
 
 /* Pre-defined dash types */
 #define DASHTYPE_CUSTOM (-3)
@@ -112,7 +111,7 @@ typedef struct t_dashtype {
                              {0,0,0,0,0,0,0,0} }
 
 typedef struct lp_style_type {	/* contains all Line and Point properties */
-    int     pointflag;		/* 0 if points not used, otherwise 1 */
+    int     flags;		/* e.g. LP_SHOW_POINTS */
     int     l_type;
     int	    p_type;
     int     d_type;		/* Dashtype */
@@ -127,6 +126,11 @@ typedef struct lp_style_type {	/* contains all Line and Point properties */
 
 #define DEFAULT_LP_STYLE_TYPE {0, LT_BLACK, 0, DASHTYPE_SOLID, 0, 1.0, PTSZ_DEFAULT, 0, DEFAULT_COLORSPEC, DEFAULT_DASHPATTERN}
 
+/* Bit definitions for lp_style_type.flags */
+#define LP_SHOW_POINTS     (0x1) /* if not set, ignore the point properties of this line style */
+#define LP_NOT_INITIALIZED (0x2) /* internal flag used in set.c:parse_label_options */
+#define LP_EXPLICIT_COLOR  (0x4) /* set by lp_parse if the user provided a color spec */
+
 #define DEFAULT_COLOR_SEQUENCE { 0x9400d3, 0x009e73, 0x56b4e9, 0xe69f00, \
                                  0xf0e442, 0x0072b2, 0xe51e10, 0x000000 }
 #define PODO_COLOR_SEQUENCE { 0x000000, 0xe69f00, 0x56b4e9, 0x009e73, \
@@ -349,7 +353,7 @@ typedef struct TERMENTRY {
     void (*boxed_text) __PROTO((unsigned int, unsigned int, int));
 #endif
 
-    void (*modify_plots) __PROTO((unsigned int operations));
+    void (*modify_plots) __PROTO((unsigned int operations, int plotno));
 
     void (*dashtype) __PROTO((int type, t_dashtype *custom_dash_pattern));
 
diff --git a/src/time.c b/src/time.c
index 3402605..b080169 100644
--- a/src/time.c
+++ b/src/time.c
@@ -1,5 +1,5 @@
 #ifndef lint
-static char *RCSid() { return RCSid("$Id: time.c,v 1.28 2014/01/27 21:53:16 sfeam Exp $"); }
+static char *RCSid() { return RCSid("$Id: time.c,v 1.28.2.1 2014/11/08 04:52:26 sfeam Exp $"); }
 #endif
 
 /* GNUPLOT - time.c */
@@ -78,7 +78,7 @@ static int gdysize __PROTO((int yr));
 
 static int mndday[12] = { 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 };
 
-static size_t xstrftime __PROTO((char *buf, size_t bufsz, const char *fmt, struct tm * tm, double usec));
+static size_t xstrftime __PROTO((char *buf, size_t bufsz, const char *fmt, struct tm * tm, double usec, double fulltime));
 
 /* days in year */
 static int
@@ -327,7 +327,7 @@ gstrftime(char *s, size_t bsz, const char *fmt, double l_clock)
 
     usec = l_clock - (double)floor(l_clock);
 
-    return xstrftime(s, bsz, fmt, &tm, usec);
+    return xstrftime(s, bsz, fmt, &tm, usec, l_clock);
 }
 
 
@@ -337,18 +337,20 @@ xstrftime(
     size_t bsz,			/* space available */
     const char *fmt,
     struct tm *tm,
-    double usec)
+    double usec,
+    double fulltime)
 {
     size_t l = 0;			/* chars written so far */
-
+    int incr = 0;			/* chars just written */
     char *s = str;
+    TBOOLEAN sign_printed = FALSE;
 
-    memset(s, '\0', bsz);
+    memset(str, '\0', bsz);
 
     while (*fmt != '\0') {
 	if (*fmt != '%') {
-	    if (l >= bsz)
-		return (0);
+	    if (l >= bsz-1)
+		return 0;
 	    *s++ = *fmt++;
 	    l++;
 	} else {
@@ -400,8 +402,8 @@ xstrftime(
 			if (!z)					\
 			    z=(dz);				\
 		    }						\
-		    CHECK_SPACE(w);				\
-		    sprintf(s, z ? "%0*d" : "%*d", w, (x));	\
+		    incr = snprintf(s, bsz-l-1, z ? "%0*d" : "%*d", w, (x));	\
+		    CHECK_SPACE(incr);				\
 		} while(0)
 
 	    case '%':
@@ -426,27 +428,18 @@ xstrftime(
 		COPY_STRING(full_month_names[tm->tm_mon]);
 		break;
 
-
-#if 0
-		/* %x not currently supported, so neither is c */
-	    case 'c':
-		if (!xstrftime(s, bsz - l, "%x %X", tm, 0.))
-		    return (0);
-		break;
-#endif
-
 	    case 'd':
 		FORMAT_STRING(1, 2, tm->tm_mday);	/* %02d */
 		break;
 
 	    case 'D':
-		if (!xstrftime(s, bsz - l, "%m/%d/%y", tm, 0.))
-		    return (0);
+		if (!xstrftime(s, bsz - l, "%m/%d/%y", tm, 0., fulltime))
+		    return 0;
 		break;
 
 	    case 'F':
-		if (!xstrftime(s, bsz - l, "%Y-%m-%d", tm, 0.))
-		    return (0);
+		if (!xstrftime(s, bsz - l, "%Y-%m-%d", tm, 0., fulltime))
+		    return 0;
 		break;
 
 	    case 'H':
@@ -484,13 +477,13 @@ xstrftime(
 		break;
 
 	    case 'r':
-		if (!xstrftime(s, bsz - l, "%I:%M:%S %p", tm, 0.))
-		    return (0);
+		if (!xstrftime(s, bsz - l, "%I:%M:%S %p", tm, 0., fulltime))
+		    return 0;
 		break;
 
 	    case 'R':
-		if (!xstrftime(s, bsz - l, "%H:%M", tm, 0.))
-		    return (0);
+		if (!xstrftime(s, bsz - l, "%H:%M", tm, 0., fulltime))
+		    return 0;
 		break;
 
 	    case 's':
@@ -512,10 +505,77 @@ xstrftime(
 		break;
 
 	    case 'T':
-		if (!xstrftime(s, bsz - l, "%H:%M:%S", tm, 0.))
-		    return (0);
+		if (!xstrftime(s, bsz - l, "%H:%M:%S", tm, 0., fulltime))
+		    return 0;
 		break;
 
+	    case 't':		/* Time (as opposed to Date) formats */
+		{
+		int tminute, tsecond;
+
+		    switch (*fmt++) {
+		    case 'H':
+			/* +/- fractional hours (not wrapped at 24h) */
+			if (p > 0) {
+			    incr = snprintf(s, bsz-l-1, "%*.*f", w, p, fulltime/3600.);
+			    CHECK_SPACE(incr);
+			    break;
+			}
+			/* Set flag in case minutes come next */
+			if (fulltime < 0) {
+			    CHECK_SPACE(1);	/* the minus sign */
+			    sign_printed = TRUE;
+			    *s++ = '-';
+			    l++;
+			}
+			/* +/- integral hour truncated toward zero */
+			sprintf(s, "%0*d", w, (int)floor(fabs(fulltime/3600.)));
+			break;
+		    case 'M':
+			/* +/- fractional minutes (not wrapped at 60m) */
+			if (p > 0) {
+			    incr = snprintf(s, bsz-l-1, "%*.*f", w, p,
+				    sign_printed ? fabs(fulltime)/60. : fulltime/60.);
+			    CHECK_SPACE(incr);
+			    break;
+			}
+			/* +/- integral minute truncated toward zero */
+			tminute = floor(60. * (fabs(fulltime/3600.) - floor(fabs(fulltime/3600.))));
+			if (fulltime < 0) {
+			    if (!sign_printed) {
+				sign_printed = TRUE;
+				*s++ = '-';
+				l++;
+			    }
+			}
+			FORMAT_STRING(1, 2, tminute);	/* %02d */
+			break;
+		    case 'S':
+			/* +/- fractional seconds */
+			tsecond = floor(60. * (fabs(fulltime/60.) - floor(fabs(fulltime/60.))));
+			if (fulltime < 0) {
+			    if (usec > 0)
+				usec = 1.0 - usec;
+			    if (!sign_printed) {
+				*s++ = '-';
+				l++;
+			    }
+			}
+			FORMAT_STRING(1, 2, tsecond);	/* %02d */
+			if (p > 0) {
+			    double base = pow(10., (double)p);
+			    int msec = floor(0.5 + base * usec);
+			    char *f = &s[strlen(s)];
+			    CHECK_SPACE(p+1);
+			    sprintf(f, ".%0*d", p, msec<(int)base?msec:(int)base-1);
+			}
+			break;
+		    default:
+			break;
+		    }
+		    break;
+		}
+
 	    case 'W':		/* mon 1 day of week */
 		{
 		    int week;
@@ -580,11 +640,6 @@ xstrftime(
 		FORMAT_STRING(1, 4, tm->tm_year);	/* %04d */
 		break;
 
-#if 0
-	    case 'Z':
-		COPY_STRING(tm->tm_zone);
-		break;
-#endif
 	    }			/* switch */
 
 	    while (*s != '\0') {
diff --git a/src/unset.c b/src/unset.c
index 0f245cd..820f8ac 100644
--- a/src/unset.c
+++ b/src/unset.c
@@ -1,5 +1,5 @@
 #ifndef lint
-static char *RCSid() { return RCSid("$Id: unset.c,v 1.206 2014/06/27 03:23:26 sfeam Exp $"); }
+static char *RCSid() { return RCSid("$Id: unset.c,v 1.206.2.3 2014/11/08 04:52:26 sfeam Exp $"); }
 #endif
 
 /* GNUPLOT - unset.c */
@@ -873,6 +873,7 @@ unset_fit()
     free(fit_script);
     fit_script = NULL;
     fit_wrap = 0;
+    /* do not reset fit_v4compatible */
 }
 
 /* process 'unset grid' command */
@@ -1218,6 +1219,7 @@ unset_tics(AXIS_INDEX axis)
 	axis_array[i].ticdef.textcolor.value = 0;
 	axis_array[i].ticdef.offset = tics_nooffset;
 	axis_array[i].ticdef.rangelimited = (i >= PARALLEL_AXES) ? TRUE : FALSE;
+	axis_array[i].ticdef.enhanced = TRUE;
 	axis_array[i].tic_rotate = 0;
 	axis_array[i].ticscale = 1.0;
 	axis_array[i].miniticscale = 0.5;
@@ -1537,22 +1539,8 @@ unset_ticslevel()
 static void
 unset_timefmt()
 {
-    int axis;
-
-    if (END_OF_COMMAND)
-	for (axis=0; axis < AXIS_ARRAY_SIZE; axis++) {
-	    free(axis_array[axis].timefmt);
-	    axis_array[axis].timefmt = gp_strdup(TIMEFMT);
-	}
-    else if ((axis=lookup_table(axisname_tbl, c_token)) >= 0) {
-	free(axis_array[axis].timefmt);
-	axis_array[axis].timefmt = gp_strdup(TIMEFMT);
-	c_token++;
-    }
-    else
-	/* int_error() from inside 'reset' would cause problems */
-	int_warn(c_token, "expected optional axis name");
-
+    free(timefmt);
+    timefmt = gp_strdup(TIMEFMT);
 }
 
 
@@ -1592,6 +1580,7 @@ static void
 unset_timedata(AXIS_INDEX axis)
 {
     axis_array[axis].datatype = DT_NORMAL;
+    axis_array[axis].tictype = DT_NORMAL;
 }
 
 
@@ -1748,7 +1737,6 @@ reset_command()
 
 	/* Free contents before overwriting with default values */
 	free(axis_array[axis].formatstring);
-	free(axis_array[axis].timefmt);
 	if (axis_array[axis].link_udf)
 	    free(axis_array[axis].link_udf->at);
 	free_marklist(axis_array[axis].ticdef.def.user);
diff --git a/src/version.c b/src/version.c
index e9cf44a..04d8a28 100644
--- a/src/version.c
+++ b/src/version.c
@@ -40,11 +40,11 @@ static char *RCSid() { return RCSid("$Id: version.c,v 1.111.2.1 2014/08/22 16:07
 
 
 const char gnuplot_version[] = "5.0";
-const char gnuplot_patchlevel[] = "rc2";
+const char gnuplot_patchlevel[] = "rc3";
 #ifdef DEVELOPMENT_VERSION
 #include "timestamp.h"
 #else
-const char gnuplot_date[] = "2014-08-22 ";
+const char gnuplot_date[] = "2014-11-11 ";
 #endif
 const char gnuplot_copyright[] = "Copyright (C) 1986-1993, 1998, 2004, 2007-2014";
 
diff --git a/src/wxterminal/wxt_gui.cpp b/src/wxterminal/wxt_gui.cpp
index f9db71a..719c45e 100644
--- a/src/wxterminal/wxt_gui.cpp
+++ b/src/wxterminal/wxt_gui.cpp
@@ -1,5 +1,5 @@
 /*
- * $Id: wxt_gui.cpp,v 1.128 2014/06/09 12:17:31 markisch Exp $
+ * $Id: wxt_gui.cpp,v 1.128.2.6 2014/11/12 05:20:18 sfeam Exp $
  */
 
 /* GNUPLOT - wxt_gui.cpp */
@@ -117,6 +117,9 @@
 #include "bitmaps/png/config_png.h"
 #include "bitmaps/png/help_png.h"
 
+/* standard icon art from wx (used only for "Export to file" */
+#include <wx/artprov.h>
+
 /* Interactive toggle control variables
  */
 static int wxt_cur_plotno = 0;
@@ -173,6 +176,8 @@ END_EVENT_TABLE()
 BEGIN_EVENT_TABLE( wxtFrame, wxFrame )
 	EVT_CLOSE( wxtFrame::OnClose )
 	EVT_SIZE( wxtFrame::OnSize )
+	EVT_TOOL( Toolbar_ExportToFile, wxtFrame::OnExport )
+	/* Clipboard widget (should consolidate this with Export to File) */
 	EVT_TOOL( Toolbar_CopyToClipboard, wxtFrame::OnCopy )
 #ifdef USE_MOUSE
 	EVT_TOOL( Toolbar_Replot, wxtFrame::OnReplot )
@@ -416,10 +421,14 @@ wxtFrame::wxtFrame( const wxString& title, wxWindowID id )
 	/* set up the toolbar */
 	wxToolBar * toolbar = CreateToolBar();
 	/* With wxMSW, default toolbar size is only 16x15. */
-//	toolbar->SetToolBitmapSize(wxSize(16,16));
+	// toolbar->SetToolBitmapSize(wxSize(16,16));
 
 	toolbar->AddTool(Toolbar_CopyToClipboard, wxT("Copy"),
-				*(toolBarBitmaps[0]), wxT("Copy the plot to clipboard"));
+				wxArtProvider::GetBitmap(wxART_PASTE, wxART_TOOLBAR),
+				wxT("Copy plot to clipboard"));
+	toolbar->AddTool(Toolbar_ExportToFile, wxT("Export"),
+				wxArtProvider::GetBitmap(wxART_FILE_SAVE_AS, wxART_TOOLBAR),
+				wxT("Export plot to file"));
 #ifdef USE_MOUSE
 #ifdef __WXOSX_COCOA__
 	/* wx 2.9 Cocoa bug & crash workaround for Lion, which does not have toolbar separators anymore */
@@ -479,6 +488,101 @@ wxtFrame::~wxtFrame()
 }
 
 
+/* toolbar event : Export to file
+ * We will create a file dialog, using platform-independant wxWidgets functions
+ */
+void wxtFrame::OnExport( wxCommandEvent& WXUNUSED( event ) )
+{
+	static int userFilterIndex = 0;
+
+	wxFileDialog exportFileDialog (this, wxT("Exported File Format"),
+		wxGetCwd(), wxT(""),
+		wxT("PNG files (*.png)|*.png|PDF files (*.pdf)|*.pdf|SVG files (*.svg)|*.svg"),
+		wxFD_SAVE|wxFD_OVERWRITE_PROMPT|wxFD_CHANGE_DIR);
+	exportFileDialog.SetFilterIndex(userFilterIndex);
+
+	if (exportFileDialog.ShowModal() == wxID_CANCEL)
+		return;
+
+	/* wxID_OK:  User wants to save to a file. */
+
+	wxString fullpathFilename = exportFileDialog.GetPath();
+	wxString fileExt = fullpathFilename.AfterLast ('.');
+
+	cairo_status_t ierr;
+	cairo_surface_t *surface;
+	cairo_t* save_cr;
+
+	switch (exportFileDialog.GetFilterIndex()) {
+	case 0 :
+		/* Save as PNG file. */
+		if (fileExt != wxT("png") && fileExt != wxT("PNG"))
+			fullpathFilename += wxT(".png");
+		surface = cairo_get_target(wxt_current_plot->cr);
+		ierr = cairo_surface_write_to_png(surface, fullpathFilename.mb_str(wxConvUTF8));
+		if (ierr != CAIRO_STATUS_SUCCESS)
+			fprintf(stderr,"error writing PNG file: %s\n", cairo_status_to_string(ierr));
+		break;
+
+	case 1 :
+		/* Save as PDF file. */
+		if (fileExt != wxT("pdf") && fileExt != wxT("PDF"))
+			fullpathFilename += wxT(".pdf");
+
+		save_cr = wxt_current_plot->cr;
+		cairo_save(save_cr);
+		surface = cairo_pdf_surface_create(
+			fullpathFilename.mb_str(wxConvUTF8),
+			wxt_current_plot->device_xmax, wxt_current_plot->device_ymax);
+		wxt_current_plot->cr = cairo_create(surface);
+		cairo_surface_destroy(surface);
+
+		cairo_scale(wxt_current_plot->cr,
+			1./(double)wxt_current_plot->oversampling_scale,
+			1./(double)wxt_current_plot->oversampling_scale);
+		wxt_current_panel->wxt_cairo_refresh();
+
+		cairo_surface_show_page(surface);
+		cairo_surface_finish(surface);
+		wxt_current_plot->cr = save_cr;
+		cairo_restore(wxt_current_plot->cr);
+		break;
+
+	case 2 :
+#ifdef CAIRO_HAS_SVG_SURFACE
+		/* Save as SVG file. */
+		if (fileExt != wxT("svg") && fileExt != wxT("SVG"))
+			fullpathFilename += wxT(".svg");
+
+		save_cr = wxt_current_plot->cr;
+		cairo_save(save_cr);
+		surface = cairo_svg_surface_create(
+			fullpathFilename.mb_str(wxConvUTF8),
+			wxt_current_plot->device_xmax, wxt_current_plot->device_ymax);
+		wxt_current_plot->cr = cairo_create(surface);
+		cairo_surface_destroy(surface);
+
+		cairo_scale(wxt_current_plot->cr,
+			1./(double)wxt_current_plot->oversampling_scale,
+			1./(double)wxt_current_plot->oversampling_scale);
+		wxt_current_panel->wxt_cairo_refresh();
+
+		cairo_surface_show_page(surface);
+		cairo_surface_finish(surface);
+		wxt_current_plot->cr = save_cr;
+		cairo_restore(wxt_current_plot->cr);
+		break;
+#endif
+
+	default :
+		fprintf(stderr, "Can't save in that file type.\n");
+		break;
+	}
+
+	/* Save user environment selections. */
+	userFilterIndex = exportFileDialog.GetFilterIndex();
+}
+
 /* toolbar event : Copy to clipboard
  * We will copy the panel to a bitmap, using platform-independant wxWidgets functions */
 void wxtFrame::OnCopy( wxCommandEvent& WXUNUSED( event ) )
@@ -608,7 +712,9 @@ void wxtFrame::OnClose( wxCloseEvent& event )
 
 /* when the window is resized,
  * resize the panel to fit in the frame.
- * Note : can't simply use "replot", as it doesn't work with multiplot mode */
+ * If the tool widget setting for "redraw on resize" is set, replot in new size.
+ * FIXME : Loses all but most recent component of a multiplot.
+ */
 void wxtFrame::OnSize( wxSizeEvent& event )
 {
 	FPRINTF((stderr,"frame OnSize\n"));
@@ -621,6 +727,10 @@ void wxtFrame::OnSize( wxSizeEvent& event )
 	/* wx 2.9 Cocoa bug workaround, that does not adjust layout for status bar on resize */
 	PositionStatusBar();
 #endif
+
+	/* Note: On some platforms OnSize() might get called before the settings have been initialized in wxt_init(). */
+	if ((wxt_redraw == yes) && replot_line && replot_line[0] != '\0')
+		wxt_exec_event(GE_keypress, 0, 0, 'e' , 0, this->GetId());
 }
 
 /* wrapper for AddPendingEvent or ProcessEvent */
@@ -1475,6 +1585,7 @@ void wxtConfigDialog::OnButton( wxCommandEvent& event )
 		wxt_persist = persist_setting?yes:no;
 		wxt_ctrl = ctrl_setting?yes:no;
 		wxt_toggle = toggle_setting?yes:no;
+		wxt_redraw = redraw_setting?yes:no;
 
 		switch (rendering_setting) {
 		case 0 :
@@ -1505,6 +1616,8 @@ void wxtConfigDialog::OnButton( wxCommandEvent& event )
 			wxLogError(wxT("Cannot write ctrl"));
 		if (!pConfig->Write(wxT("toggle"), toggle_setting))
 			wxLogError(wxT("Cannot write toggle"));
+		if (!pConfig->Write(wxT("redraw"), redraw_setting))
+			wxLogError(wxT("Cannot write redraw_setting"));
 		if (!pConfig->Write(wxT("rendering"), rendering_setting))
 			wxLogError(wxT("Cannot write rendering_setting"));
 		if (!pConfig->Write(wxT("hinting"), hinting_setting))
@@ -1536,6 +1649,7 @@ wxtConfigDialog::wxtConfigDialog(wxWindow* parent)
 	pConfig->Read(wxT("persist"),&persist_setting);
 	pConfig->Read(wxT("ctrl"),&ctrl_setting);
 	pConfig->Read(wxT("toggle"),&toggle_setting);
+	pConfig->Read(wxT("redraw"),&redraw_setting);
 	pConfig->Read(wxT("rendering"),&rendering_setting);
 	pConfig->Read(wxT("hinting"),&hinting_setting);
 
@@ -1553,6 +1667,10 @@ wxtConfigDialog::wxtConfigDialog(wxWindow* parent)
 		wxT("Toggle plots on/off when key sample is clicked"),
 		wxDefaultPosition, wxDefaultSize, 0, wxGenericValidator(&toggle_setting));
 
+	wxCheckBox *check5 = new wxCheckBox (this, wxID_ANY,
+		wxT("Redraw continuously as plot is resized"),
+		wxDefaultPosition, wxDefaultSize, 0, wxGenericValidator(&redraw_setting));
+
 	wxString choices[3];
 	choices[0] = wxT("No antialiasing");
 	choices[1] = wxT("Antialiasing");
@@ -1598,6 +1716,7 @@ wxtConfigDialog::wxtConfigDialog(wxWindow* parent)
 	vsizer->Add(check2,wxSizerFlags().Align(0).Expand().Border(wxALL));
 	vsizer->Add(check3,wxSizerFlags().Align(0).Expand().Border(wxALL));
 	vsizer->Add(check4,wxSizerFlags().Align(0).Expand().Border(wxALL));
+	vsizer->Add(check5,wxSizerFlags().Align(0).Expand().Border(wxALL));
 	vsizer->Add(box_sizer2,wxSizerFlags().Align(0).Expand().Border(wxALL));
 	/*vsizer->Add(CreateButtonSizer(wxOK|wxCANCEL),wxSizerFlags().Align(0).Expand().Border(wxALL));*/
 	vsizer->Add(hsizer,wxSizerFlags().Align(0).Expand().Border(wxALL));
@@ -1744,6 +1863,7 @@ void wxt_init()
 	bool persist_setting;
 	bool ctrl_setting;
 	bool toggle_setting;
+	bool redraw_setting;
 	int rendering_setting;
 	int hinting_setting;
 
@@ -1775,6 +1895,13 @@ void wxt_init()
 	if (wxt_toggle==UNSET)
 		wxt_toggle = toggle_setting?yes:no;
 
+	if (!pConfig->Read(wxT("redraw"), &redraw_setting)) {
+		pConfig->Write(wxT("redraw"), false);
+		redraw_setting = false;
+	}
+	if (wxt_redraw==UNSET)
+		wxt_redraw = redraw_setting?yes:no;
+
 	if (!pConfig->Read(wxT("rendering"), &rendering_setting)) {
 		pConfig->Write(wxT("rendering"), 2);
 		rendering_setting = 2;
@@ -2065,10 +2192,11 @@ void wxt_put_text(unsigned int x, unsigned int y, const char * string)
 		* closing brace, but we don't really expect to find one.
 		* If the return value is not the nul-terminator of the
 		* string, that can only mean that we did find an unmatched
-		* closing brace in the string. We inplot->crement past it (else
+		* closing brace in the string. We increment past it (else
 		* we get stuck in an infinite loop) and try again. */
 
-		while (*(string = enhanced_recursion((char*)string, TRUE, wxt_current_plot->fontname,
+		while (*(string = enhanced_recursion((char*)string, TRUE,
+				wxt_set_fontname,
 				wxt_current_plot->fontsize * wxt_set_fontscale,
 				0.0, TRUE, TRUE, 0))) {
 			wxt_enhanced_flush();
@@ -2626,10 +2754,17 @@ void wxt_boxed_text(unsigned int x, unsigned int y, int option)
 }
 #endif
 
-void wxt_modify_plots(unsigned int ops)
+void wxt_modify_plots(unsigned int ops, int plotno)
 {
 	int i;
+	plotno++;
+
+	if (wxt_status == STATUS_UNINITIALIZED)
+		return;
+
 	for (i=1; i<=wxt_cur_plotno && i<wxt_max_key_boxes; i++) {
+		if (plotno > 0 && i != plotno)
+			continue;
 		if ((ops & MODPLOTS_INVERT_VISIBILITIES) == MODPLOTS_INVERT_VISIBILITIES) {
 			wxt_key_boxes[i].hidden = !wxt_key_boxes[i].hidden;
 		} else if (ops & MODPLOTS_SET_VISIBLE) {
diff --git a/src/wxterminal/wxt_gui.h b/src/wxterminal/wxt_gui.h
index b7f47d6..92e2283 100644
--- a/src/wxterminal/wxt_gui.h
+++ b/src/wxterminal/wxt_gui.h
@@ -1,5 +1,5 @@
 /*
- * $Id: wxt_gui.h,v 1.48 2014/06/20 22:58:46 sfeam Exp $
+ * $Id: wxt_gui.h,v 1.48.2.2 2014/11/08 03:08:42 sfeam Exp $
  */
 
 /* GNUPLOT - wxt_gui.h */
@@ -81,6 +81,9 @@
 #include <wx/dataobj.h>
 #include <wx/clipbrd.h>
 
+/* Save File dialog */
+#include <wx/filedlg.h>
+
 /* wxImage facility */
 #include <wx/image.h>
 
@@ -176,6 +179,14 @@ extern "C" {
 /* for cairo_t */
 # include <cairo.h>
 
+#ifdef CAIRO_HAS_SVG_SURFACE
+#include <cairo/cairo-svg.h>
+#endif
+
+#ifdef CAIRO_HAS_PDF_SURFACE
+#include <cairo/cairo-pdf.h>
+#endif
+
 # ifdef USE_GTK
 #  include <gdk/gdk.h>
 #  include <gtk/gtk.h>
@@ -453,6 +464,7 @@ class wxtConfigDialog : public wxDialog
 	bool persist_setting;
 	bool ctrl_setting;
 	bool toggle_setting;
+	bool redraw_setting;
 	/* rendering_setting :
 	 * 0 = no antialiasing, no oversampling
 	 * 1 = antialiasing, no oversampling
@@ -474,6 +486,7 @@ public:
 	void OnClose( wxCloseEvent& event );
 	void OnSize( wxSizeEvent& event );
 	void OnCopy( wxCommandEvent& event );
+	void OnExport( wxCommandEvent& event );
 #ifdef USE_MOUSE
 	void OnReplot( wxCommandEvent& event );
 	void OnToggleGrid( wxCommandEvent& event );
@@ -504,6 +517,7 @@ private:
 enum {
 /* start at wxID_HIGHEST to avoid collisions */
 Toolbar_CopyToClipboard = wxID_HIGHEST,
+Toolbar_ExportToFile,
 Toolbar_Replot,
 Toolbar_ToggleGrid,
 Toolbar_ZoomPrevious,
diff --git a/src/wxterminal/wxt_term.h b/src/wxterminal/wxt_term.h
index e7a9ed8..6e48408 100644
--- a/src/wxterminal/wxt_term.h
+++ b/src/wxterminal/wxt_term.h
@@ -1,5 +1,5 @@
 /*
- * $Id: wxt_term.h,v 1.25 2014/04/20 20:23:35 lodewyck Exp $
+ * $Id: wxt_term.h,v 1.25.2.2 2014/11/12 05:20:18 sfeam Exp $
  */
 
 /* GNUPLOT - wxt_term.h */
@@ -97,7 +97,7 @@ void wxt_hypertext(int type, const char *text);
 void wxt_boxed_text(unsigned int x, unsigned int y, int option);
 #endif
 
-void wxt_modify_plots(unsigned int);
+void wxt_modify_plots(unsigned int, int);
 
 void wxt_dashtype(int type, t_dashtype *custom_dash_pattern);
 
@@ -122,6 +122,7 @@ extern int wxt_persist;
 extern int wxt_raise;
 extern int wxt_ctrl;
 extern int wxt_toggle;
+extern int wxt_redraw;
 extern char wxt_set_fontname[MAX_ID_LEN + 1];
 extern int wxt_set_fontsize;
 extern double wxt_set_fontscale;
diff --git a/term/Makefile.am b/term/Makefile.am
index fe88ebf..5fa038a 100644
--- a/term/Makefile.am
+++ b/term/Makefile.am
@@ -12,16 +12,15 @@ jsdir = $(pkgdatadir)/$(VERSION_MAJOR)/js
 # List of terminal drivers, and list of postscript installation files
 # must be created prior to running automake
 ##trm-files-begin
-CORETERM = aed.trm ai.trm aquaterm.trm be.trm caca.trm cairo.trm \
-canvas.trm cgm.trm context.trm corel.trm debug.trm djsvga.trm dumb.trm \
-dxf.trm dxy.trm eepic.trm emf.trm emxvga.trm epson.trm estimate.trm \
-excl.trm fig.trm gd.trm ggi.trm gpic.trm grass.trm hp2648.trm hp26.trm \
-hp500c.trm hpgl.trm hpljii.trm hppj.trm imagen.trm kyo.trm latex.trm \
-linux.trm lua.trm metafont.trm metapost.trm mif.trm next.trm openstep.trm \
-pbm.trm pc.trm pdf.trm pm.trm post.trm pslatex.trm pstricks.trm qms.trm \
-qt.trm regis.trm sun.trm svg.trm t410x.trm tek.trm texdraw.trm tgif.trm \
-tkcanvas.trm tpic.trm v384.trm vgagl.trm vws.trm win.trm wxt.trm x11.trm \
-xlib.trm 
+CORETERM = ai.trm aquaterm.trm be.trm caca.trm cairo.trm canvas.trm \
+cgm.trm context.trm corel.trm debug.trm djsvga.trm dumb.trm dxf.trm \
+dxy.trm eepic.trm emf.trm emxvga.trm epson.trm estimate.trm excl.trm \
+fig.trm gd.trm ggi.trm gpic.trm grass.trm hp2648.trm hp26.trm hp500c.trm \
+hpgl.trm hpljii.trm hppj.trm imagen.trm kyo.trm latex.trm linux.trm \
+lua.trm metafont.trm metapost.trm mif.trm next.trm openstep.trm pbm.trm \
+pc.trm pdf.trm pm.trm post.trm pslatex.trm pstricks.trm qms.trm qt.trm \
+regis.trm sun.trm svg.trm t410x.trm tek.trm texdraw.trm tgif.trm \
+tkcanvas.trm tpic.trm vgagl.trm vws.trm win.trm wxt.trm x11.trm xlib.trm 
 #
 postscript_DATA = PostScript/8859-15.ps PostScript/8859-1.ps \
 PostScript/8859-2.ps PostScript/8859-9.ps PostScript/cp1250.ps \
diff --git a/term/Makefile.in b/term/Makefile.in
index 310e7a7..e322c8a 100644
--- a/term/Makefile.in
+++ b/term/Makefile.in
@@ -301,16 +301,15 @@ jsdir = $(pkgdatadir)/$(VERSION_MAJOR)/js
 
 # List of terminal drivers, and list of postscript installation files
 # must be created prior to running automake
-CORETERM = aed.trm ai.trm aquaterm.trm be.trm caca.trm cairo.trm \
-canvas.trm cgm.trm context.trm corel.trm debug.trm djsvga.trm dumb.trm \
-dxf.trm dxy.trm eepic.trm emf.trm emxvga.trm epson.trm estimate.trm \
-excl.trm fig.trm gd.trm ggi.trm gpic.trm grass.trm hp2648.trm hp26.trm \
-hp500c.trm hpgl.trm hpljii.trm hppj.trm imagen.trm kyo.trm latex.trm \
-linux.trm lua.trm metafont.trm metapost.trm mif.trm next.trm openstep.trm \
-pbm.trm pc.trm pdf.trm pm.trm post.trm pslatex.trm pstricks.trm qms.trm \
-qt.trm regis.trm sun.trm svg.trm t410x.trm tek.trm texdraw.trm tgif.trm \
-tkcanvas.trm tpic.trm v384.trm vgagl.trm vws.trm win.trm wxt.trm x11.trm \
-xlib.trm 
+CORETERM = ai.trm aquaterm.trm be.trm caca.trm cairo.trm canvas.trm \
+cgm.trm context.trm corel.trm debug.trm djsvga.trm dumb.trm dxf.trm \
+dxy.trm eepic.trm emf.trm emxvga.trm epson.trm estimate.trm excl.trm \
+fig.trm gd.trm ggi.trm gpic.trm grass.trm hp2648.trm hp26.trm hp500c.trm \
+hpgl.trm hpljii.trm hppj.trm imagen.trm kyo.trm latex.trm linux.trm \
+lua.trm metafont.trm metapost.trm mif.trm next.trm openstep.trm pbm.trm \
+pc.trm pdf.trm pm.trm post.trm pslatex.trm pstricks.trm qms.trm qt.trm \
+regis.trm sun.trm svg.trm t410x.trm tek.trm texdraw.trm tgif.trm \
+tkcanvas.trm tpic.trm vgagl.trm vws.trm win.trm wxt.trm x11.trm xlib.trm 
 
 #
 postscript_DATA = PostScript/8859-15.ps PostScript/8859-1.ps \
diff --git a/term/README b/term/README
index 6e8b8a2..6395673 100644
--- a/term/README
+++ b/term/README
@@ -86,7 +86,7 @@ struct TERMENTRY {
 #ifdef EAM_BOXED_TEXT
     void (*boxed_text)__PROTO((unsigned int x, unsigned int y, int option));
 #endif
-   void (*modify_plots) __PROTO((unsigned int));
+   void (*modify_plots) __PROTO((unsigned int operations, int plotno));
    
    void (*dashtype) __PROTO((int type, t_dashtype *custom_dash_pattern));
 };
@@ -479,9 +479,9 @@ _hypertext(int type, const char *text)
    triggered by mousing over the object. Possible future extensions
    include treating the text as a URL activated by mouse click.
 
-_modify_plots(unsigned int operations) - used for interactive terminals.
-   Apply operations to every plot in the graph. Operations are given
-   in the passed bitmask.  Possible values are given in term_api.h
+_modify_plots(unsigned int operations, int plotno) - used for interactive terminals.
+   Apply operations to a single plot or to every plot in the graph.
+   Bit definitions in the operations bitmask are given in term_api.h
    and include SET_VISIBLE and SET_INVISIBLE.
 
 _dashtype(int type, t_dashtype *custom_dash_pattern) - set dash/dot 
diff --git a/term/aed.trm b/term/aed.trm
deleted file mode 100644
index 01c7ac6..0000000
--- a/term/aed.trm
+++ /dev/null
@@ -1,224 +0,0 @@
-/* Hello, Emacs, this is -*-C-*-
- * $Id: aed.trm,v 1.14 2006/07/21 02:35:45 sfeam Exp $
- *
- */
-
-/* GNUPLOT - aed.trm */
-
-/*[
- * Copyright 1990 - 1993, 1998, 2004
- *
- * Permission to use, copy, and distribute this software and its
- * documentation for any purpose with or without fee is hereby granted,
- * provided that the above copyright notice appear in all copies and
- * that both that copyright notice and this permission notice appear
- * in supporting documentation.
- *
- * Permission to modify the software is granted, but not the right to
- * distribute the complete modified source code.  Modifications are to
- * be distributed as patches to the released version.  Permission to
- * distribute binaries produced by compiling modified sources is granted,
- * provided you
- *   1. distribute the corresponding source modifications from the
- *    released version in the form of a patch file along with the binaries,
- *   2. add special version identification to distinguish your version
- *    in addition to the base release version number,
- *   3. provide your name and address as the primary contact for the
- *    support of your modified version, and
- *   4. retain our contact information in regard to use of the base
- *    software.
- * Permission to distribute the released version of the source code along
- * with corresponding source modifications in the form of a patch file is
- * granted with same provisions 2 through 4 for binary distributions.
- *
- * This software is provided "as is" without express or implied warranty
- * to the extent permitted by applicable law.
-]*/
-
-/*
- * This file is included by ../term.c.
- *
- * This terminal driver supports:
- *   AED terminals
- *
- * AUTHORS
- *     Colin Kelley, Thomas Williams, Russell Lang
- *
- * send your comments or suggestions to (gnuplot-info at lists.sourceforge.net).
- *
- */
-
-/*
- * adapted to the new terminal layout by Stefan Bodewig (Dez. 1995)
- */
-
-#include "driver.h"
-
-#ifdef TERM_REGISTER
-register_term(aed512)
-register_term(aed767)
-#endif
-
-#ifdef TERM_PROTO
-TERM_PUBLIC void AED_init __PROTO((void));
-TERM_PUBLIC void AED_graphics __PROTO((void));
-TERM_PUBLIC void AED_text __PROTO((void));
-TERM_PUBLIC void AED_linetype __PROTO((int linetype));
-TERM_PUBLIC void AED_move __PROTO((unsigned int x, unsigned int y));
-TERM_PUBLIC void AED_vector __PROTO((unsigned int x, unsigned int y));
-TERM_PUBLIC void AED_put_text __PROTO((unsigned int x, unsigned int y, const char *str));
-TERM_PUBLIC void AED_reset __PROTO((void));
-
-#define AED_XMAX 768
-#define AED_YMAX 575
-
-#define AED_VCHAR	13
-#define AED_HCHAR	8
-#define AED_VTIC	8
-#define AED_HTIC	7
-
-/* slightly different for AED 512 */
-#define AED5_XMAX 512
-#endif
-
-#ifndef TERM_PROTO_ONLY
-#ifdef TERM_BODY
-
-#define AED_XLAST (AED_XMAX - 1)
-#define AED_YLAST (AED_YMAX - 1)
-
-#define AED5_XLAST (AED5_XMAX - 1)
-
-TERM_PUBLIC void
-AED_init()
-{
-    fputs("\033SEN3DDDN.SEC.7.SCT.0.1.80.80.90.SBC.0.AAV2.MOV.0.9.CHR.0.FFD", gpoutfile);
-/*         2            3     4                5     7    6       1
-	1. Clear Screen
-	2. Set Encoding
-	3. Set Default Color
-	4. Set Backround Color Table Entry
-	5. Set Backround Color
-	6. Move to Bottom Lefthand Corner
-	7. Anti-Alias Vectors
-*/
-}
-
-
-TERM_PUBLIC void
-AED_graphics()
-{
-    fputs("\033FFD\033", gpoutfile);
-}
-
-
-TERM_PUBLIC void
-AED_text()
-{
-    fputs("\033MOV.0.9.SEC.7.XXX", gpoutfile);
-}
-
-
-
-TERM_PUBLIC void
-AED_linetype(int linetype)
-{
-    static int color[2 + 9] = { 7, 1, 6, 2, 3, 5, 1, 6, 2, 3, 5 };
-    static int type[2 + 9] = { 85, 85, 255, 255, 255, 255, 255, 85, 85, 85, 85 };
-
-    if (linetype <= -3)
-	return;
-    if (linetype >= 10)
-	linetype %= 10;
-
-    fprintf(gpoutfile, "\
-\033SLS%d.255.\
-\033SEC%d.",
-	    type[linetype + 2],
-	    color[linetype + 2]);
-}
-
-
-
-TERM_PUBLIC void
-AED_move(unsigned int x, unsigned int y)
-{
-    fprintf(gpoutfile, "\033MOV%d.%d.", x, y);
-}
-
-
-TERM_PUBLIC void
-AED_vector(unsigned int x, unsigned int y)
-{
-    fprintf(gpoutfile, "\033DVA%d.%d.", x, y);
-}
-
-
-TERM_PUBLIC void
-AED_put_text(unsigned int x, unsigned int y, const char *str)
-{
-    AED_move(x, y - AED_VCHAR / 2 + 2);
-    fprintf(gpoutfile, "\033XXX%s\033", str);
-}
-
-
-#define hxt (AED_HTIC/2)
-#define hyt (AED_VTIC/2)
-
-TERM_PUBLIC void
-AED_reset()
-{
-    fputs("\033SCT0.1.0.0.0.SBC.0.FFD", gpoutfile);
-}
-
-#endif /* TERM_BODY */
-
-#ifdef TERM_TABLE
-TERM_TABLE_START(aed512_driver)
-    "aed512", "AED 512 Terminal",
-    AED5_XMAX, AED_YMAX, AED_VCHAR, AED_HCHAR,
-    AED_VTIC, AED_HTIC, options_null, AED_init, AED_reset,
-    AED_text, null_scale, AED_graphics, AED_move, AED_vector,
-    AED_linetype, AED_put_text, null_text_angle,
-    null_justify_text, do_point, do_arrow, set_font_null
-TERM_TABLE_END(aed512_driver)
-
-#undef LAST_TERM
-#define LAST_TERM aed512_driver
-
-TERM_TABLE_START(aed767_driver)
-    "aed767", "AED 767 Terminal",
-    AED_XMAX, AED_YMAX, AED_VCHAR, AED_HCHAR,
-    AED_VTIC, AED_HTIC, options_null, AED_init, AED_reset,
-    AED_text, null_scale, AED_graphics, AED_move, AED_vector,
-    AED_linetype, AED_put_text, null_text_angle,
-    null_justify_text, do_point, do_arrow, set_font_null
-TERM_TABLE_END(aed767_driver)
-
-#undef LAST_TERM
-#define LAST_TERM aed767_driver
-
-#endif /* TERM_TABLE */
-#endif /* TERM_PROTO_ONLY */
-
-#ifdef TERM_HELP
-START_HELP(aed767)
-"1 aed767",
-"?commands set terminal aed767",
-"?set terminal aed767",
-"?set term aed767",
-"?terminal aed767",
-"?term aed767",
-"?aed767",
-"?commands set terminal aed512",
-"?set terminal aed512",
-"?set term aed512",
-"?terminal aed512",
-"?term aed512",
-"?aed512",
-" The `aed512` and `aed767` terminal drivers support AED graphics terminals.",
-" The two drivers differ only in their horizontal ranges, which are 512 and",
-" 768 pixels, respectively.  Their vertical range is 575 pixels.  There are",
-" no options for these drivers."
-END_HELP(aed767)
-#endif
diff --git a/term/caca.trm b/term/caca.trm
index 030baa7..3cc4510 100644
--- a/term/caca.trm
+++ b/term/caca.trm
@@ -1,7 +1,7 @@
 /*
  * GNUPLOT - caca.trm
  *
- * $Id: caca.trm,v 1.6 2014/06/04 08:11:00 markisch Exp $
+ * $Id: caca.trm,v 1.6.2.1 2014/11/12 05:20:18 sfeam Exp $
  *
  * This file uses UTF8 encoding and a tab size of 4.
  *
@@ -81,7 +81,7 @@ TERM_PUBLIC void CACA_hypertext(int type, const char *text);
 #ifdef EAM_BOXED_TEXT
 TERM_PUBLIC void CACA_boxed_text(unsigned int x, unsigned int y, int option);
 #endif
-TERM_PUBLIC void CACA_modify_plots(unsigned int operations);
+TERM_PUBLIC void CACA_modify_plots(unsigned int operations, int plotno);
 
 #endif /* TERM_PROTO */
 
@@ -2475,12 +2475,16 @@ CACA_boxed_text(unsigned int x, unsigned int y, int option)
 
 
 TERM_PUBLIC void
-CACA_modify_plots(unsigned int operations)
+CACA_modify_plots(unsigned int operations, int plotno)
 {
 	int i;
 	TBOOLEAN changed = FALSE;
 
 	for (i = 0; (i < CACA_plotno) && (i < CACA_maxkeyboxes) && (i < CACA_maxhideplots); i++) {
+
+		if (plotno >= 0 && i != plotno)
+			continue;
+
 		switch (operations) {
 		case MODPLOTS_INVERT_VISIBILITIES:
 			CACA_hideplot[i] = ! CACA_hideplot[i];
@@ -2500,6 +2504,7 @@ CACA_modify_plots(unsigned int operations)
 			break;
 		}
 	}
+
 	if (changed) {
 		/* Replot only if something changed. */
 		CACA_zoom_or_replot = TRUE;
diff --git a/term/cairo.trm b/term/cairo.trm
index 353ed1d..bdf0d2c 100644
--- a/term/cairo.trm
+++ b/term/cairo.trm
@@ -1,5 +1,5 @@
 /* Hello, Emacs: this is -*-C-*- !
- * $Id: cairo.trm,v 1.71 2014/07/01 14:46:25 sfeam Exp $
+ * $Id: cairo.trm,v 1.71.2.1 2014/11/01 16:48:01 sfeam Exp $
  */
 
 /* GNUPLOT - cairo.trm */
@@ -1009,7 +1009,7 @@ void cairotrm_put_text(unsigned int x, unsigned int y, const char * string)
 	* we get stuck in an infinite loop) and try again. */
 
 	while (*(string = enhanced_recursion((char*)string, TRUE, 
-			plot.fontname, plot.fontsize,
+			cairo_params->fontname, plot.fontsize,
 			0.0, TRUE, TRUE, 0))) {
 		cairotrm_enhanced_flush();
 
diff --git a/term/js/gnuplot_mouse.js b/term/js/gnuplot_mouse.js
index 17b2961..385ac90 100644
--- a/term/js/gnuplot_mouse.js
+++ b/term/js/gnuplot_mouse.js
@@ -1,7 +1,7 @@
 /*
- * $Id: gnuplot_mouse.js,v 1.22 2013/05/07 22:13:46 sfeam Exp $
+ * $Id: gnuplot_mouse.js,v 1.22.2.2 2014/09/26 20:42:56 sfeam Exp $
  */
-    gnuplot.mouse_version = " 7 May 2013";
+    gnuplot.mouse_version = " 26 September 2014";
 
 // Mousing code for use with gnuplot's 'canvas' terminal driver.
 // The functions defined here assume that the javascript plot produced by
@@ -205,7 +205,7 @@ gnuplot.mouse_update = function(e)
   }
 
   // See if we are over a hypertext anchor point
-  if (typeof(gnuplot.hypertext_list != "unknown") && gnuplot.hypertext_list.length > 0) {
+  if (gnuplot.hypertext_list != "undefined" && gnuplot.hypertext_list.length > 0) {
     gnuplot.check_hypertext();
   }
 }
diff --git a/term/lua.trm b/term/lua.trm
index c0c7b9e..af63d68 100644
--- a/term/lua.trm
+++ b/term/lua.trm
@@ -1,6 +1,6 @@
 /*
- *  $Id: lua.trm,v 1.23 2014/06/12 17:22:04 sfeam Exp $
- *  $Date: 2014/06/12 17:22:04 $
+ *  $Id: lua.trm,v 1.23.2.2 2014/10/29 03:28:24 sfeam Exp $
+ *  $Date: 2014/10/29 03:28:24 $
  *  $Rev: 99 $
  */
 
@@ -77,6 +77,9 @@ TERM_PUBLIC void LUA_set_color __PROTO((t_colorspec *));
 TERM_PUBLIC void LUA_filled_polygon __PROTO((int, gpiPoint *));
 TERM_PUBLIC void LUA_image __PROTO((unsigned, unsigned, coordval *, gpiPoint *, t_imagecolor));
 TERM_PUBLIC void LUA_path __PROTO((int p));
+#ifdef EAM_BOXED_TEXT
+TERM_PUBLIC void LUA_boxed_text __PROTO((unsigned int, unsigned int, int));
+#endif
 
 /* defaults */
 #define LUA_XMAX 10000.0
@@ -723,8 +726,8 @@ LUA_get_colorstyle(int style) {
     case TC_LINESTYLE:/* Use the color of line style <n> (only for "internal" use or unsused?) */
       style_str = "LINESTYLE";
       break;
-    case TC_RGB:      /* Explicit RGB triple provided by user */
-      style_str = "RGB";
+    case TC_RGB:      /* Explicit RGBA values provided by user */
+      style_str = "RGBA";
       break;
     case TC_CB:       /* "palette cb <value>" (only for "internal" use or unsused?) */
       style_str = "CB";
@@ -1178,6 +1181,7 @@ LUA_set_color (t_colorspec *colorspec)
 
   double gray = colorspec->value;
   rgb_color color = {0.,0.,0.};
+  double opacity = 1.0;
 
   if(LUA_init_luaterm_function("set_color")) {
     if (colorspec->type == TC_FRAC) {
@@ -1186,6 +1190,7 @@ LUA_set_color (t_colorspec *colorspec)
               1 : floor(gray * sm_palette.colors) / sm_palette.colors;
       rgb1_from_gray( gray, &color );
     } else if (colorspec->type == TC_RGB) {
+      opacity = 1.0 - (double)(colorspec->lt >> 24 & 255) / 255.;
       color.r = (double)((colorspec->lt >> 16 ) & 255) / 255.;
       color.g = (double)((colorspec->lt >> 8 ) & 255) / 255.;
       color.b = (double)(colorspec->lt & 255) / 255.;
@@ -1198,10 +1203,11 @@ LUA_set_color (t_colorspec *colorspec)
     lua_pushstring(L, LUA_get_colorstyle(colorspec->type));
     lua_pushinteger(L, colorspec->lt);
     lua_pushnumber(L, colorspec->value);
+    lua_pushnumber(L, opacity);
     lua_pushnumber(L, color.r);
     lua_pushnumber(L, color.g);
     lua_pushnumber(L, color.b);
-    LUA_call_report(lua_pcall(L, 6, 1, tb));
+    LUA_call_report(lua_pcall(L, 7, 1, tb));
     lua_term_result = (int)lua_tointeger(L, -1);
     lua_pop(L, 1);
   }
@@ -1370,6 +1376,40 @@ LUA_image (unsigned m, unsigned n, coordval *image, gpiPoint *corner, t_imagecol
   }
 }
 
+#ifdef EAM_BOXED_TEXT
+
+TERM_PUBLIC void
+LUA_boxed_text __PROTO((unsigned int x, unsigned int y, int option))
+{
+    const char *option_str = "UNKNOWN";
+    switch (option) {
+    case TEXTBOX_INIT:
+	option_str = "INIT";
+	break;
+    case TEXTBOX_OUTLINE:
+	option_str = "OUTLINE";
+	break;
+    case TEXTBOX_BACKGROUNDFILL:
+	option_str = "BACKGROUNDFILL";
+	break;
+    case TEXTBOX_MARGINS:
+	option_str = "MARGINS";
+	break;
+    default:
+	break;
+    }
+	    
+    if(LUA_init_luaterm_function("boxed_text")) {
+	lua_pushinteger(L, x);
+	lua_pushinteger(L, y);
+	lua_pushstring(L, option_str);
+	LUA_call_report(lua_pcall(L, 3, 1, tb));
+	lua_term_result = (int)lua_tointeger(L, -1);
+	lua_pop(L, 1);
+    }
+}
+
+#endif
 
 #endif /* TERM_BODY */
 
@@ -1397,7 +1437,7 @@ TERM_TABLE_START(lua_driver)
    , LUA_TSCALE
     , NULL /* hypertext */
 #ifdef EAM_BOXED_TEXT
-    , NULL
+    , LUA_boxed_text
 #endif
     , NULL /* modify plots */
     , LUA_dashtype
@@ -1427,7 +1467,7 @@ TERM_TABLE_START(tikz_driver)
    , LUA_TSCALE
     , NULL /* hypertext */
 #ifdef EAM_BOXED_TEXT
-    , NULL
+    , LUA_boxed_text
 #endif
     , NULL /* modify plots */
     , LUA_dashtype
diff --git a/term/lua/gnuplot-tikz.help b/term/lua/gnuplot-tikz.help
index 090826d..e1b2505 100644
--- a/term/lua/gnuplot-tikz.help
+++ b/term/lua/gnuplot-tikz.help
@@ -23,6 +23,7 @@
 "      {font \"<fontdesc>\"}",
 "      {{fontscale | textscale} <scale>}",
 "      {dashlength | dl <DL>}",
+"      {linewidth | lw <LW>}",
 "      {nofulldoc | nostandalone | fulldoc | standalone}",
 "      {{preamble | header} \"<preamble_string>\"}",
 "      {tikzplot <ltn>,...}",
@@ -94,7 +95,8 @@
 " All texts in the plot are scaled by this factor then.",
 "",
 " 'dashlength' or 'dl' scales the length of dashed-line segments by <DL>,",
-" which is a floating-point number greater than zero.",
+" which is a floating-point number greater than zero. 'linewidth' or ",
+" 'lw' scales all linewidths by <LW>.",
 "",
 " The options 'tex', 'latex' and 'context' choose the TeX output",
 " format. LaTeX is the default. To load the style file put the",
diff --git a/term/lua/gnuplot-tikz.lua b/term/lua/gnuplot-tikz.lua
index 64bdfd9..98c7942 100644
--- a/term/lua/gnuplot-tikz.lua
+++ b/term/lua/gnuplot-tikz.lua
@@ -37,7 +37,7 @@
 
 
 
-  $Date: 2014/06/12 17:22:04 $
+  $Date: 2014/11/09 00:46:53 $
   $Author: sfeam $
   $Rev: 100 $
 
@@ -81,7 +81,7 @@ pgf.DEFAULT_FONT_V_CHAR = 308
 pgf.STYLE_FILE_BASENAME = "gnuplot-lua-tikz"  -- \usepackage{gnuplot-lua-tikz}
 
 pgf.REVISION = string.sub("$Rev: 100 $",7,-3)
-pgf.REVISION_DATE = string.gsub("$Date: 2014/06/12 17:22:04 $",
+pgf.REVISION_DATE = string.gsub("$Date: 2014/11/09 00:46:53 $",
                                 "$Date: ([0-9]+).([0-9]+).([0-9]+) .*","%1/%2/%3")
 
 pgf.styles = {}
@@ -128,7 +128,7 @@ pgf.styles.linetypes_axes = {
 }
 
 pgf.styles.linetypes = {
-  [1] = {"gp lt plot 0", ""},  -- first graph
+  [1] = {"gp lt plot 0", ""}, -- first graph
   [2] = {"gp lt plot 1", ""}, -- second ...
   [3] = {"gp lt plot 2", ""},
   [4] = {"gp lt plot 3", ""},
@@ -138,7 +138,13 @@ pgf.styles.linetypes = {
   [8] = {"gp lt plot 7", ""}
 }
 
+pgf.styles.dashtypes_axes = {
+  [1] = {"gp dt solid", "solid"},
+  [2] = {"gp dt axes", "dotted"}
+}
+
 pgf.styles.dashtypes = {
+  [0] = {"gp dt 0", "solid"}, 
   [1] = {"gp dt 1", "solid"},
   [2] = {"gp dt 2", "dash pattern=on 7.5*\\gpdashlength off 7.5*\\gpdashlength"},
   [3] = {"gp dt 3", "dash pattern=on 3.75*\\gpdashlength off 5.625*\\gpdashlength"},
@@ -297,7 +303,6 @@ pgf.write_graph_end = function(noenv)
 end
 
 pgf.draw_path = function(t)
-
   local use_plot = false
   local c_str = '--'
 
@@ -312,7 +317,11 @@ pgf.draw_path = function(t)
     end
   end
 
-  gp.write("\\draw[gp path] ")
+  gp.write("\\draw[gp path")
+  if gfx.opacity < 1.0 then
+    gp.write(string.format(",opacity=%.3f", gfx.opacity))
+  end
+  gp.write("] ")
   if use_plot then
     gp.write("plot["..pgf.styles.plotstyles[((gfx.linetype_idx_set) % #pgf.styles.plotstyles)+1][1].."] coordinates {")
   end
@@ -342,12 +351,15 @@ end
 
 pgf.draw_arrow = function(t, direction, headstyle)
   gp.write("\\draw[gp path")
-  if direction ~= '' then
+  if direction ~= '' and direction ~= nil then
     gp.write(","..direction)
   end
   if headstyle > 0 then
     gp.write(",gp arrow "..headstyle)
   end
+  if gfx.opacity < 1.0 then
+    gp.write(string.format(",opacity=%.3f", gfx.opacity))
+  end
   gp.write("]")
   gp.write("("..pgf.format_coord(t[1][1], t[1][2])..")")
   for i = 2,#t do
@@ -402,8 +414,17 @@ pgf.write_text_node = function(t, text, angle, justification, font)
   if font ~= '' then
     node_options = node_options .. ",font=" .. font
   end  
-  gp.write(string.format("\\node[%s] at (%s) {%s};\n", 
-          node_options, pgf.format_coord(t[1], t[2]), text))
+  node_name = ''
+  if gfx.boxed_text then
+     gfx.boxed_text_count = gfx.boxed_text_count + 1
+     node_options = node_options .. ",inner sep=0pt"
+     node_name = string.format("(gp boxed node %d)", gfx.boxed_text_count)
+  end
+  if gfx.opacity < 1.0 then
+    node_options = node_options .. string.format(",text opacity=%.3f", gfx.opacity)
+  end
+  gp.write(string.format("\\node[%s]%s at (%s) {%s};\n", 
+          node_options, node_name, pgf.format_coord(t[1], t[2]), text))
 end
 
 
@@ -564,7 +585,7 @@ f_latex:write("          ["..pgf.REVISION_DATE.." (rev. "..pgf.REVISION..") GNUP
 f_latex:write([[
 \RequirePackage{tikz}
 
-\usetikzlibrary{arrows,patterns,plotmarks,backgrounds}
+\usetikzlibrary{arrows,patterns,plotmarks,backgrounds,fit}
 ]])
 f_latex:write("\\input "..name_common.."\n")
 f_latex:write([[
@@ -642,7 +663,7 @@ f:write([[
 % check for the correct TikZ version
 \def\gpchecktikzversion#1.#2\relax{%
 \ifnum#1<2%
-  \PackageError{gnuplot-lua-tikz}{PGF/TikZ version >= 2.0 is required, but version \pgfversion\space was found}{}%
+  \errmessage{PGF/TikZ version >= 2.0 is required!}%
 \fi}
 \expandafter\gpchecktikzversion\pgfversion\relax
 
@@ -987,9 +1008,13 @@ f:write([[
   f:write("\n% dash type settings\n")
   f:write("% Define this as a macro so that the dash patterns expand later with the current \\pgflinewidth.\n")
   f:write("\\def\\gpdashlength{\\pgflinewidth}\n")
-  for i = 1, #pgf.styles.dashtypes do
+  for i = 0, #pgf.styles.dashtypes do
     f:write("\\tikzset{"..pgf.styles.dashtypes[i][1].."/.style={"..pgf.styles.dashtypes[i][2].."}}\n")
   end
+  for i = 1, #pgf.styles.dashtypes_axes do
+    f:write("\\tikzset{"..pgf.styles.dashtypes_axes[i][1].."/.style={"..pgf.styles.dashtypes_axes[i][2].."}}\n")
+  end
+
   f:write("\n% command for switching to colored lines\n")
   f:write("\\def\\gpcoloredlines{%\n")
   for i = 1, #pgf.styles.lt_colors do
@@ -1036,6 +1061,7 @@ pgf.print_help = function(fwrite)
       {font "<fontdesc>"}
       {{fontscale | textscale} <scale>}
       {dashlength | dl <DL>}
+      {linewidth | lw <LW>}
       {nofulldoc | nostandalone | fulldoc | standalone}
       {{preamble | header} "<preamble_string>"}
       {tikzplot <ltn>,...}
@@ -1107,7 +1133,8 @@ pgf.print_help = function(fwrite)
  All texts in the plot are scaled by this factor then.
 
  'dashlength' or 'dl' scales the length of dashed-line segments by <DL>,
- which is a floating-point number greater than zero.
+ which is a floating-point number greater than zero. 'linewidth' or 
+ 'lw' scales all linewidths by <LW>.
 
  The options 'tex', 'latex' and 'context' choose the TeX output
  format. LaTeX is the default. To load the style file put the
@@ -1203,6 +1230,12 @@ gfx.dashtype_idx = nil       -- current dashtype intended for the plot
 gfx.dashtype_idx_set = nil   -- current dashtype set in the plot
 gfx.linewidth = nil
 gfx.linewidth_set = nil
+gfx.opacity = 1.0
+
+gfx.boxed_text = false
+gfx.boxed_text_count = 0    -- number of nodes inside the current box
+gfx.boxed_text_xmargin = 0
+gfx.boxed_text_ymargin = 0
 
 -- internal calculated scaling factors
 gfx.scalex = 1
@@ -1275,7 +1308,8 @@ gfx.opt = {
   tightboundingbox = false,
   -- fontscale
   fontscale = nil,
-  dashlength = nil
+  dashlength = nil,
+  linewidth = 1.0
 }
 
 -- Formats for the various TeX flavors 
@@ -1488,13 +1522,13 @@ gfx.check_in_path = function()
   end
   
   -- ignore zero length paths
-    if #gfx.path > 1 then
+  if #gfx.path > 1 then
     -- check all line properties and draw current path
     gfx.check_color()
     gfx.check_linetype()
     gfx.check_dashtype()
     gfx.check_linewidth()
-      pgf.draw_path(gfx.path)
+    pgf.draw_path(gfx.path)
     -- remember last coordinates
     gfx.start_path(gfx.path[#gfx.path][1], gfx.path[#gfx.path][2])
   end
@@ -1504,7 +1538,7 @@ end
 gfx.check_linetype = function()
   if gfx.linetype_idx ~= gfx.linetype_idx_set then
     local lt
-    if gfx.linetype_idx < 0 then
+    if gfx.linetype_idx == -1 or gfx.linetype_idx == -2 then
         lt = pgf.styles.linetypes_axes[math.abs(gfx.linetype_idx)][1]
     else
       lt = pgf.styles.linetypes[(gfx.linetype_idx % #pgf.styles.linetypes)+1][1]
@@ -1519,8 +1553,10 @@ gfx.check_dashtype = function()
   if gfx.dashtype_idx ~= gfx.dashtype_idx_set then
     -- if gfx.dashtype_idx is a string, it contains a custom dash pattern
     if type(gfx.dashtype_idx) == type(1) then
-      if gfx.dashtype_idx > 0 then
-        pgf.set_dashtype(pgf.styles.dashtypes[(gfx.dashtype_idx % #pgf.styles.dashtypes)+1][1])
+      if gfx.dashtype_idx == -1 or gfx.dashtype_idx == -2 then
+        pgf.set_dashtype(pgf.styles.dashtypes_axes[math.abs(gfx.dashtype_idx)][1])
+      elseif gfx.dashtype_idx > 0 then
+        pgf.set_dashtype(pgf.styles.dashtypes[(gfx.dashtype_idx % #pgf.styles.dashtypes) + 1][1])
       end
     else
        pgf.set_dashtype("dash pattern="..gfx.dashtype_idx)
@@ -1572,13 +1608,16 @@ gfx.start_path = function(x, y)
   gfx.posy = y
 end
 
--- ctype  string  LT|RGB|GRAY
--- val   table   {name}|{r,g,b}
+-- ctype  string  LT|RGBA|GRAY
+-- val   table   {name}|{r,g,b,alpha}
+-- returns a properly formatted color parameter string, or nil if LT_NODRAW was used.
 gfx.format_color = function(ctype, val)
   local c
   if ctype == 'LT' then
     if val[1] < 0 then
-      if val[1] < -2 then --  LT_NODRAW, LT_BACKGROUND, LT_UNDEFINED
+      if val[1] == -3 then
+        c = nil
+      elseif val[1] < -2 then --  LT_NODRAW, LT_BACKGROUND, LT_UNDEFINED
         c = 'color=gpbgfillcolor'
       else
         c = 'color='..pgf.styles.lt_colors_axes[math.abs(val[1])][1]
@@ -1587,18 +1626,24 @@ gfx.format_color = function(ctype, val)
       c = 'color='..pgf.styles.lt_colors[(val[1] % #pgf.styles.lt_colors)+1][1]
     end
     -- c = pgf.styles.lt_colors[((val[1]+3) % #pgf.styles.lt_colors) + 1][1]
-  elseif ctype == 'RGB' then
-    c = string.format("rgb color={%.3f,%.3f,%.3f}", val[1], val[2], val[3])
   elseif ctype == 'RGBA' then
-      c = string.format("rgb color={%.3f,%.3f,%.3f},opacity=%.3f", val[1], val[2], val[3], val[4])
+    c = string.format("rgb color={%.3f,%.3f,%.3f}", val[1], val[2], val[3])
   elseif ctype == 'GRAY' then
     c = string.format("color=black!%i", 100*val[1]+0.5)
   end
   return c
 end
 
+gfx.set_opacity = function(ctype, val)
+  gfx.opacity = 1.0
+  if (ctype == 'RGBA') then
+     gfx.opacity = val[4]
+  end
+end
+
 gfx.set_color = function(ctype, val)
   gfx.color = gfx.format_color(ctype, val)
+  gfx.set_opacity(ctype, val)
 end
 
 
@@ -1647,7 +1692,7 @@ term.options = function(opt_str, initial, t_count)
   local o_type = nil
   local s_start, s_end = 1, 1
   local term_opt = ""
-  local term_opt_font, term_opt_size, term_opt_background, term_opt_fontscale, term_opt_dashlength, term_opt_scale, term_opt_preamble = "", "", "", "", "", ""
+  local term_opt_font, term_opt_size, term_opt_background, term_opt_fontscale, term_opt_dashlength, term_opt_linewidth, term_opt_scale, term_opt_preamble = "", "", "", "", "", "", "", ""
   local charsize_h, charsize_v, fontsize, fontscale, dashlength = nil, nil, nil, nil, nil
   -- trim spaces
   opt_str = opt_str:gsub("^%s*(.-)%s*$", "%1")
@@ -1925,6 +1970,17 @@ term.options = function(opt_str, initial, t_count)
       else
         gp.int_error(t_count, string.format("error: number expected, got `%s'.", o_next))
       end
+    elseif almost_equals(o_next, "linew$idth") or almost_equals(o_next, "lw") then
+      get_next_token()
+      if o_type == 'number' then
+        gfx.opt.linewidth = tonumber(o_next)
+        if gfx.opt.linewidth <= 0 then
+          gfx.opt.linewidth = 1.0
+        end
+	term_opt_linewidth = string.format("linewidth %.1f ", gfx.opt.linewidth)
+      else
+        gp.int_error(t_count, string.format("error: number expected, got `%s'.", o_next))
+      end
     elseif almost_equals(o_next, "externalimages") then
       if term.external_images ~= nil then
         term.external_images = true;
@@ -2028,6 +2084,7 @@ term.options = function(opt_str, initial, t_count)
   tf(true, term_opt_background, nil)
   tf(true, term_opt_fontscale, nil)
   tf(true, term_opt_dashlength, nil)
+  tf(true, term_opt_linewidth, nil)
   tf((#gfx.opt.latex_preamble>0), term_opt_preamble, 'nopreamble')
   tf(gfx.opt.lines_colored, 'color', 'monochrome')
   tf(gfx.opt.full_doc, 'standalone', 'nostandalone')
@@ -2083,21 +2140,25 @@ end
 
 
 term.vector = function(x, y)
-  if #gfx.path == 0 then
-    gfx.start_path(gfx.posx, gfx.posy)
-  elseif not gfx.check_coord(x, y) then
-    -- checked for zero path length and add the path coords to gfx.path
-    gfx.path[#gfx.path+1] = {x,y}
+  if gfx.linetype_idx ~= -3 then
+    if #gfx.path == 0 then
+      gfx.start_path(gfx.posx, gfx.posy)
+    elseif not gfx.check_coord(x, y) then
+      -- checked for zero path length and add the path coords to gfx.path
+      gfx.path[#gfx.path+1] = {x,y}
+    end
   end
   return 1
 end
 
 term.move = function(x, y)
-  -- only "move" if we change our latest position
-  if not gfx.check_coord(x, y) then
-    -- finish old path and start a new one
-    gfx.check_in_path()
-    gfx.start_path(x, y)
+  if gfx.linetype_idx ~= -3 then
+    -- only "move" if we change our latest position
+    if not gfx.check_coord(x, y) then
+      -- finish old path and start a new one
+      gfx.check_in_path()
+      gfx.start_path(x, y)
+    end
   end
   return 1
 end
@@ -2107,10 +2168,16 @@ term.linetype = function(ltype)
 
   gfx.set_color('LT', {ltype})
 
-  if (ltype < -2) then -- LT_NODRAW, LT_BACKGROUND, LT_UNDEFINED
-    ltype = -2
+  if (ltype < -4) then -- LT_NODRAW = -3, LT_BACKGROUND = -4
+    ltype = -3
   end
 
+  if ltype == -1 then  -- LT_AXIS
+    gfx.dashtype_idx = -2
+  end
+  if ltype == -2 then  -- LT_SOLID
+    gfx.dashtype_idx = -1
+  end
   gfx.linetype_idx = ltype
 
   return 1
@@ -2171,6 +2238,9 @@ end
   int filled        /* arrow head filled or not */
 ]]
 term.arrow = function(sx, sy, ex, ey, head, length, angle, backangle, filled)
+  if gfx.linetype_idx == -3 then -- LT_NODRAW
+    return 1
+  end
   if gfx.opt.gp_arrows then
     return 0
   else
@@ -2216,7 +2286,41 @@ term.text_angle = function(ang)
   return 1
 end
 
+term.boxed_text = function(x, y, option)
+   if (option == 'INIT') then
+      gfx.boxed_text = true
+      gfx.boxed_text_count = 0
+   elseif (option == 'MARGINS') then
+      gfx.boxed_text_xmargin = x / 100.0
+      gfx.boxed_text_ymargin = y / 100.0
+   elseif (option == 'BACKGROUNDFILL' or option == 'OUTLINE') then
+      gfx.check_color()
+      gfx.check_linetype()
+      gfx.check_dashtype()
+      gfx.check_linewidth()
+      if (gfx.boxed_text_count > 0) then
+	 gp.write('\\node[')
+	 if (option == 'BACKGROUNDFILL') then
+	    gp.write('fill = gpbgfillcolor,')
+	 else
+	    gfx.boxed_text = false
+	    gp.write('draw, gp path,')
+	 end
+	 gp.write(string.format('inner xsep=%.2f, inner ysep=%.2f,', gfx.boxed_text_xmargin, gfx.boxed_text_ymargin))
+	 gp.write('fit=')
+	 for i=1,gfx.boxed_text_count do
+	    gp.write(string.format('(gp boxed node %d)', i))
+	 end
+	 gp.write(']{};\n')
+      end
+   elseif (option == 'FINISH') then
+      gfx.boxed_text = false
+   end
+   return 1
+end
+
 term.linewidth = function(width)
+  width = width * gfx.opt.linewidth
   if gfx.linewidth ~= width then
     gfx.check_in_path()
     gfx.linewidth = width
@@ -2235,7 +2339,7 @@ end
 term.set_font = function(font)
   local fontsize = nil
   gfx.text_font, fontsize = gfx.parse_font_string(font)
-  if fontsize ~= nil then
+  if fontsize then
     term.h_char = pgf.DEFAULT_FONT_H_CHAR * (fontsize/10) * (pgf.DEFAULT_RESOLUTION/1000)
     term.v_char = pgf.DEFAULT_FONT_V_CHAR * (fontsize/10) * (pgf.DEFAULT_RESOLUTION/1000)
   end
@@ -2277,7 +2381,7 @@ term.filled_polygon = function(style, fillpar, t)
       pattern = ''
       color = gfx.color
       saturation = 100
-      opacity = 100
+      opacity = 100 * gfx.opacity
   elseif style == 'SOLID' then
       pattern = ''
       color = gfx.color
@@ -2318,7 +2422,7 @@ end
 -- points[row][column]
 -- m: #cols, n: #rows
 -- corners: clip box and draw box coordinates
--- ctype: "RGB" or "RGBA" or "PALETTE"
+-- ctype: "RGBA" or "PALETTE"
 term.image = function(m, n, points, corners, ctype, xfile)
   gfx.check_in_path()
   
@@ -2348,13 +2452,17 @@ term.image = function(m, n, points, corners, ctype, xfile)
     local w = (corners[2][1] - corners[1][1])/m
     local h = (corners[1][2] - corners[2][2])/n
 
-    local yy,yyy,xx,xxx
+    local yy,yyy,xx,xxx,color
     for cnt = 1,#points do
       xx = corners[1][1]+(cnt%m-1)*w
       yy = corners[1][2]-math.floor(cnt/m)*h
       yyy = yy-h
       xxx = xx+w
-      pgf.draw_fill({{xx, yy}, {xxx, yy}, {xxx, yyy}, {xx, yyy}}, '', gfx.format_color(ctype, points[cnt]) , 100, 100)
+      color = gfx.format_color(ctype, points[cnt])
+      gfx.set_opacity(ctype, points[cnt])
+      if color ~= nil then
+        pgf.draw_fill({{xx, yy}, {xxx, yy}, {xxx, yyy}, {xx, yyy}}, '', color, 100, 100*gfx.opacity)
+      end
     end
   end
   pgf.write_clipbox_end()
@@ -2369,7 +2477,7 @@ term.previous_palette = function()
   return 1
 end
 
-term.set_color = function(ctype, lt, value, r, g, b)
+term.set_color = function(ctype, lt, value, opacity, r, g, b)
   gfx.check_in_path()
   -- FIXME gryscale on monochrome?? ... or use xcolor?
 
@@ -2377,12 +2485,12 @@ term.set_color = function(ctype, lt, value, r, g, b)
     gfx.set_color('LT', {lt})
   elseif ctype == 'FRAC' then
     if gfx.opt.lines_colored then
-      gfx.set_color('RGB', {r, g , b})
+      gfx.set_color('RGBA', {r, g , b, 1.0})
     else
       gfx.set_color('GRAY', {value})
     end
-  elseif ctype == 'RGB' then
-    gfx.set_color('RGB', {r, g , b})
+  elseif ctype == 'RGBA' then
+    gfx.set_color('RGBA', {r, g , b, opacity})
   else
     gp.int_error(string.format("set color: unknown type (%s), lt (%i), value (%.3f)\n", ctype, lt, value))
   end
diff --git a/term/v384.trm b/term/v384.trm
deleted file mode 100644
index e3b4166..0000000
--- a/term/v384.trm
+++ /dev/null
@@ -1,207 +0,0 @@
-/* Hello, Emacs, this is -*-C-*-
- * $Id: v384.trm,v 1.12 2006/07/21 02:35:48 sfeam Exp $
- *
- */
-
-/* GNUPLOT - v384.trm */
-
-/*[
- * Copyright 1990 - 1993, 1998, 2004
- *
- * Permission to use, copy, and distribute this software and its
- * documentation for any purpose with or without fee is hereby granted,
- * provided that the above copyright notice appear in all copies and
- * that both that copyright notice and this permission notice appear
- * in supporting documentation.
- *
- * Permission to modify the software is granted, but not the right to
- * distribute the complete modified source code.  Modifications are to
- * be distributed as patches to the released version.  Permission to
- * distribute binaries produced by compiling modified sources is granted,
- * provided you
- *   1. distribute the corresponding source modifications from the
- *    released version in the form of a patch file along with the binaries,
- *   2. add special version identification to distinguish your version
- *    in addition to the base release version number,
- *   3. provide your name and address as the primary contact for the
- *    support of your modified version, and
- *   4. retain our contact information in regard to use of the base
- *    software.
- * Permission to distribute the released version of the source code along
- * with corresponding source modifications in the form of a patch file is
- * granted with same provisions 2 through 4 for binary distributions.
- *
- * This software is provided "as is" without express or implied warranty
- * to the extent permitted by applicable law.
-]*/
-
-/*
- * This file is included by ../term.c.
- *
- * This terminal driver supports:
- *  Vectrix 384 - works with tandy color printer as well
- *
- * AUTHORS
- *   roland at moncskermit.OZ (Roland Yap)
- *
- * send your comments or suggestions to (gnuplot-info at lists.sourceforge.net).
- *
- */
-
-/*
- *	Vectrix 384 driver - works with tandy color printer as well
- *  in reverse printing 8 color mode.
- *  This doesn't work on Vectrix 128 because it redefines the
- *  color table. It can be hacked to work on the 128 by changing
- *  the colours but then it will probably not print best. The color
- *  table is purposely designed so that it will print well
- *
- */
-
-/*
- * adapted to the new terminal layout by Stefan Bodewig (Dec. 1995)
- */
-
-#include "driver.h"
-
-#ifdef TERM_REGISTER
-register_term(vx384)
-#endif
-
-#ifdef TERM_PROTO
-TERM_PUBLIC void V384_init __PROTO((void));
-TERM_PUBLIC void V384_graphics __PROTO((void));
-TERM_PUBLIC void V384_text __PROTO((void));
-TERM_PUBLIC void V384_linetype __PROTO((int linetype));
-TERM_PUBLIC void V384_move __PROTO((unsigned int x, unsigned int y));
-TERM_PUBLIC void V384_vector __PROTO((unsigned int x, unsigned int y));
-TERM_PUBLIC void V384_put_text __PROTO((unsigned int x, unsigned int y, const char str[]));
-TERM_PUBLIC void V384_reset __PROTO((void));
-
-#define V384_XMAX 630
-#define V384_YMAX 480
-
-#define V384_XLAST (V384_XMAX - 1)
-#define V384_YLAST (V384_YMAX - 1)
-
-#define V384_VCHAR	12
-#define V384_HCHAR	7
-#define V384_VTIC	8
-#define V384_HTIC	7
-#endif /* TERM_PROTO */
-
-#ifndef TERM_PROTO_ONLY
-#ifdef TERM_BODY
-
-TERM_PUBLIC void
-V384_init()
-{
-    fprintf(gpoutfile, "%c%c  G0   \n\
-Q 0 8\n\
-0 0 0\n\
-255 0 0\n\
-0 255 0\n\
-0 0 255\n\
-0 255 255\n\
-255 0 255\n\
-255 255 0\n\
-255 255 255\n",
-	    27, 18);
-}
-
-
-TERM_PUBLIC void
-V384_graphics()
-{
-    fprintf(gpoutfile, "%c%c E0 RE N 65535\n", 27, 18);
-}
-
-
-TERM_PUBLIC void
-V384_text()
-{
-    fprintf(gpoutfile, "%c%c\n", 27, 17);
-}
-
-
-TERM_PUBLIC void
-V384_linetype(int linetype)
-{
-    static int color[] =
-    {
-	1 /* red */ ,
-	2 /* green */ ,
-	3 /* blue */ ,
-	4 /* cyan */ ,
-	5 /* magenta */ ,
-	6 /* yellow */ ,	/* not a good color so not in use at the moment */
-	7 /* white */
-    };
-
-    if (linetype < 0)
-	linetype = 6;
-    else
-	linetype %= 5;
-
-    fprintf(gpoutfile, "C %d\n", color[linetype]);
-}
-
-
-TERM_PUBLIC void
-V384_move(unsigned int x, unsigned int y)
-{
-    fprintf(gpoutfile, "M %d %d\n", x + 20, y);
-}
-
-
-TERM_PUBLIC void
-V384_vector(unsigned int x, unsigned int y)
-{
-    fprintf(gpoutfile, "L %d %d\n", x + 20, y);
-}
-
-
-TERM_PUBLIC void
-V384_put_text(unsigned int x, unsigned int y, const char str[])
-{
-    V384_move(x, y + V384_VCHAR / 2);
-    fprintf(gpoutfile, "$%s\n", str);
-}
-
-
-TERM_PUBLIC void
-V384_reset()
-{
-}
-
-#endif /* TERM_BODY */
-
-#ifdef TERM_TABLE
-TERM_TABLE_START(vx384_driver)
-    "vx384", "Vectrix 384 and Tandy color printer",
-    V384_XMAX, V384_YMAX, V384_VCHAR, V384_HCHAR,
-    V384_VTIC, V384_HTIC, options_null, V384_init, V384_reset,
-    V384_text, null_scale, V384_graphics, V384_move, V384_vector,
-    V384_linetype, V384_put_text, null_text_angle,
-    null_justify_text, do_point, do_arrow, set_font_null
-TERM_TABLE_END(vx384_driver)
-
-#undef LAST_TERM
-#define LAST_TERM vx384_driver
-
-#endif /* TERM_TABLE */
-#endif /* TERM_PROTO_ONLY */
-
-#ifdef TERM_HELP
-START_HELP(vx384)
-"1 vx384",
-"?commands set terminal vx384",
-"?set terminal vx384",
-"?set term vx384",
-"?terminal vx384",
-"?term vx384",
-"?vx384",
-" The `vx384` terminal driver supports the Vectrix 384 and Tandy color",
-" printers.  It has no options."
-END_HELP(vx384)
-#endif
diff --git a/term/win.trm b/term/win.trm
index c597b0f..50b1561 100644
--- a/term/win.trm
+++ b/term/win.trm
@@ -1,5 +1,5 @@
 /* Hello, Emacs, this is -*-C-*-
- * $Id: win.trm,v 1.126 2014/06/09 07:24:31 markisch Exp $
+ * $Id: win.trm,v 1.126.2.4 2014/11/12 05:20:18 sfeam Exp $
  */
 
 /* GNUPLOT - win.trm */
@@ -101,7 +101,7 @@ TERM_PUBLIC void WIN_enhanced_flush __PROTO((void));
 TERM_PUBLIC void WIN_image __PROTO((unsigned int, unsigned int, coordval *, gpiPoint *, t_imagecolor));
 TERM_PUBLIC void WIN_layer __PROTO((t_termlayer syncpoint));
 TERM_PUBLIC void WIN_hypertext __PROTO((int type, const char * text));
-TERM_PUBLIC void WIN_modify_plots __PROTO((unsigned int operations));
+TERM_PUBLIC void WIN_modify_plots __PROTO((unsigned int operations, int plotno));
 
 /* Initialization values - guess now, scale later */
 #define WIN_XMAX (24000)
@@ -122,7 +122,7 @@ TERM_PUBLIC void WIN_modify_plots __PROTO((unsigned int operations));
 /* Interface routines - create list of actions for Windows */
 
 enum WIN_id { WIN_DEFAULT, WIN_MONOCHROME, WIN_COLOR, WIN_GTITLE,
-	      WIN_ENHANCED, WIN_NOENHANCED, WIN_FONT, WIN_SIZE,
+	      WIN_ENHANCED, WIN_NOENHANCED, WIN_FONT, WIN_SIZE, WIN_WSIZE,
 	      WIN_POSITION, WIN_CLOSE, WIN_BACKGROUND, WIN_FONTSCALE,
 	      WIN_LINEWIDTH, WIN_SOLID, WIN_DASHED, WIN_ROUND, WIN_BUTT,
 	      WIN_OTHER };
@@ -146,6 +146,7 @@ static struct gen_table WIN_opts[] =
     { "lw", WIN_LINEWIDTH },
     { "ti$tle", WIN_GTITLE },
     { "siz$e", WIN_SIZE },
+    { "ws$ize", WIN_WSIZE },
     { "pos$ition", WIN_POSITION },
     { "cl$ose", WIN_CLOSE },
     { NULL, WIN_OTHER }
@@ -166,7 +167,7 @@ WIN_options()
 	TBOOLEAN set_background = FALSE, set_fontscale = FALSE;
 	TBOOLEAN set_linewidth = FALSE, set_size = FALSE;
 	TBOOLEAN set_position = FALSE, set_number = FALSE;
-	TBOOLEAN set_rounded = FALSE;
+	TBOOLEAN set_wsize = FALSE, set_rounded = FALSE;
 	TBOOLEAN color, dashed, rounded;
 	COLORREF background;
 	double fontscale, linewidth;
@@ -260,6 +261,8 @@ WIN_options()
 			break;
 		case WIN_SIZE: {
 			c_token++;
+			if (set_wsize)
+				int_error(c_token, "conflicting size options");
 			if (END_OF_COMMAND)
 				int_error(c_token,"size requires 'width,heigth'");
 			win_width = real_expression();
@@ -271,6 +274,21 @@ WIN_options()
 			set_size = TRUE;
 			break;
 		}
+		case WIN_WSIZE: {
+			c_token++;
+			if (set_size)
+				int_error(c_token, "conflicting size options");
+			if (END_OF_COMMAND)
+				int_error(c_token,"windowsize requires 'width,heigth'");
+			win_width = real_expression();
+			if (!equals(c_token++,","))
+				int_error(c_token,"windowsize requires 'width,heigth'");
+			win_height = real_expression();
+			if (win_width < 1 || win_height < 1)
+				int_error(c_token, "windowsize canvas size is out of range");
+			set_wsize = TRUE;
+			break;
+		}
 		case WIN_POSITION: {
 			c_token++;
 			if (END_OF_COMMAND)
@@ -374,9 +392,17 @@ WIN_options()
 		graphwin->fontscale = fontscale;
 	if (set_linewidth)
 		graphwin->linewidth = linewidth;
-	if (set_size) {
+	if (set_size || set_wsize) {
 		graphwin->Size.x = win_width;
-		graphwin->Size.y = win_height + graphwin->StatusHeight;
+		graphwin->Size.y = win_height;
+	}
+	if (set_size) {
+		graphwin->Canvas.x = win_width;
+		graphwin->Canvas.y = win_height;
+	} 
+	if (set_wsize) {
+		graphwin->Canvas.x = 0;
+		graphwin->Canvas.y = 0;
 	}
 	if (set_position) {
 		graphwin->Origin.x = win_x;
@@ -404,7 +430,7 @@ WIN_options()
 	}
 
 	/* update graph window */
-	if ((set_position || set_size) && GraphHasWindow(graphwin))
+	if ((set_position || set_size || set_wsize) && GraphHasWindow(graphwin))
 		GraphUpdateWindowPosSize(graphwin);
 	if (GraphHasWindow(graphwin) && IsIconic(graphwin->hWndGraph))
 		ShowWindow(graphwin->hWndGraph, SW_SHOWNORMAL);
@@ -450,6 +476,13 @@ WIN_update_options()
 	if (graphwin->linewidth != 1)
 		sprintf(&(term_options[strlen(term_options)]),
 			" linewidth %.1f", graphwin->linewidth);
+
+	if (graphwin->Canvas.x != 0)
+		sprintf(&(term_options[strlen(term_options)]),
+			" size %i,%i", graphwin->Canvas.x, graphwin->Canvas.y);
+	else
+		sprintf(&(term_options[strlen(term_options)]),
+			" wsize %i,%i", graphwin->Size.x, graphwin->Size.y);
 }
 
 
@@ -898,8 +931,11 @@ WIN_boxed_text(unsigned int x, unsigned int y, int option)
 
 
 TERM_PUBLIC void
-WIN_modify_plots(unsigned int operations)
+WIN_modify_plots(unsigned int operations, int plotno)
 {
+	/* Not implemented yet */
+	if (plotno >= 0) return;
+
 	GraphModifyPlots(graphwin, operations);
 }
 
@@ -971,7 +1007,7 @@ START_HELP(windows)
 "                            {linewdith <scale>}",
 "                            {background <rgb color>}",
 "                            {title \"Plot Window Title\"}",
-"                            {size <width>,<height>}",
+"                            {{size | wsize} <width>,<height>}",
 "                            {position <x>,<y>}",
 "                            {close}",
 "",
@@ -994,7 +1030,8 @@ START_HELP(windows)
 " `linewidth` and `fontscale` can be used to scale the width of lines and",
 " the size of text.",
 " `title` changes the title of the graph window.",
-" `size` defines the width and height of the window in pixel and `position`",
+" `size` defines the width and height of the window's drawing area in pixels,",
+" `wsize` defines the actual size of the window itself and `position` defines",
 " the origin of the window i.e. the position of the top left corner on the",
 " screen (again in pixel). These options override any default settings",
 " from the `wgnuplot.ini` file.",
@@ -1062,12 +1099,13 @@ START_HELP(windows)
 "",
 " `Choose Font...` selects the font used in the graphics window.",
 "",
+#ifdef WIN_CUSTOM_PENS
 " `Line Styles...` allows customization of the line colors and styles.",
 "",
+#endif
 " `Update wgnuplot.ini` saves the current window locations, window sizes, text",
 " window font, text window font size, graph window font, graph window font",
-" size, background color and linestyles to the initialization file",
-" `wgnuplot.ini`.",
+" size, background color to the initialization file `wgnuplot.ini`.",
 "",
 "^<HR align=\"left\" width=\"100\">",
 " (*) Note that this menu is only available by pressing the right mouse button",
@@ -1185,6 +1223,7 @@ START_HELP(windows)
 "       GraphAntialiasing=1",
 "       GraphFastRotation=1",
 "       GraphBackground=255 255 255",
+#ifdef WIN_CUSTOM_PENS
 "       Border=0 0 0 0 0",
 "       Axis=192 192 192 2 2",
 "       Line1=0 0 255 0 0",
@@ -1192,6 +1231,7 @@ START_HELP(windows)
 "       Line3=255 0 0 0 2",
 "       Line4=255 0 255 0 3",
 "       Line5=0 0 128 0 4",
+#endif
 "",
 "^ <h3>Text window options</h3> ",
 "",
@@ -1213,6 +1253,7 @@ START_HELP(windows)
 "^ <h3>Graph window options</h3>",
 "",
 " The `GraphFont` entry specifies the font name and size in points.",
+#ifdef WIN_CUSTOM_PENS
 "",
 " The five",
 " numbers given in the `Border`, `Axis` and `Line` entries are the `Red`",
@@ -1223,6 +1264,7 @@ START_HELP(windows)
 " line width is 1 pixel.  If `Linestyle` is negative, it specifies the width of",
 " a SOLID line in pixels.  Line1 and any linestyle used with the `points` style",
 " must be SOLID with unit width.",
+#endif
 "",
 " See `graph-menu`."
 END_HELP(windows)
diff --git a/term/wxt.trm b/term/wxt.trm
index e638678..0b9574e 100644
--- a/term/wxt.trm
+++ b/term/wxt.trm
@@ -1,5 +1,5 @@
 /*
- * $Id: wxt.trm,v 1.42 2014/07/04 18:13:28 markisch Exp $
+ * $Id: wxt.trm,v 1.42.2.1 2014/10/26 21:19:33 sfeam Exp $
  */
 
 /* GNUPLOT - wxt.trm */
@@ -68,6 +68,7 @@ int wxt_persist = UNSET;
 int wxt_raise = UNSET;
 int wxt_ctrl = UNSET;
 int wxt_toggle = UNSET;
+int wxt_redraw = UNSET;
 t_linecap wxt_linecap = SQUARE;
 /* default text font family: */
 char wxt_set_fontname[MAX_ID_LEN + 1] = "";
diff --git a/term/x11.trm b/term/x11.trm
index 0a7704b..1da7a9b 100644
--- a/term/x11.trm
+++ b/term/x11.trm
@@ -1,5 +1,5 @@
 /* Hello, Emacs, this is -*-C-*-
- * $Id: x11.trm,v 1.222 2014/07/30 20:43:41 sfeam Exp $
+ * $Id: x11.trm,v 1.222.2.1 2014/11/12 05:20:18 sfeam Exp $
  *
  */
 
@@ -115,7 +115,7 @@ TERM_PUBLIC void ENHX11_FLUSH __PROTO((void));
 #ifdef EAM_BOXED_TEXT
 TERM_PUBLIC void ENHX11_boxed_text __PROTO((unsigned int, unsigned int, int));
 #endif
-TERM_PUBLIC void X11_modify_plots __PROTO((unsigned int));
+TERM_PUBLIC void X11_modify_plots __PROTO((unsigned int, int));
 
 /* These are the default terminal sizing parameters. These should match the
    sizes in gplt_x11.c, and both specify 640,450 */
@@ -1956,10 +1956,10 @@ ENHX11_boxed_text(unsigned int x, unsigned int y, int option)
 #endif
 
 TERM_PUBLIC void
-X11_modify_plots(unsigned int ops)
+X11_modify_plots(unsigned int ops, int plotno)
 {
     if (X11_ipc) {
-	PRINT1("O%u\n", ops);
+	PRINT2("O%u %d\n", ops, plotno);
 	FFLUSH();
     }
 }

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/gnuplot5.git



More information about the debian-science-commits mailing list