New Upstream Release - gnuplot
Ready changes
Summary
Merged new upstream version: 5.4.5beta+dfsg1 (was: 5.4.4+dfsg1).
Resulting package
Built on 2022-11-03T10:49 (took 29m9s)
The resulting binary packages can be installed (if you have the apt repository enabled) by running one of:
apt install -t fresh-releases gnuplot-dataapt install -t fresh-releases gnuplot-docapt install -t fresh-releases gnuplot-nox-dbgsymapt install -t fresh-releases gnuplot-noxapt install -t fresh-releases gnuplot-qt-dbgsymapt install -t fresh-releases gnuplot-qtapt install -t fresh-releases gnuplot-x11-dbgsymapt install -t fresh-releases gnuplot-x11apt install -t fresh-releases gnuplot
Lintian Result
- gnuplot-data_5.4.5beta+dfsg1-1~jan+nur1_all.deb
- gnuplot-doc_5.4.5beta+dfsg1-1~jan+nur1_all.deb
- gnuplot-nox-dbgsym_5.4.5beta+dfsg1-1~jan+nur1_amd64.deb
- gnuplot-nox_5.4.5beta+dfsg1-1~jan+nur1_amd64.deb
- gnuplot-qt-dbgsym_5.4.5beta+dfsg1-1~jan+nur1_amd64.deb
- gnuplot-qt_5.4.5beta+dfsg1-1~jan+nur1_amd64.deb
- gnuplot-x11-dbgsym_5.4.5beta+dfsg1-1~jan+nur1_amd64.deb
- gnuplot-x11_5.4.5beta+dfsg1-1~jan+nur1_amd64.deb
- gnuplot_5.4.5beta+dfsg1-1~jan+nur1.dsc
- gnuplot_5.4.5beta+dfsg1-1~jan+nur1_all.deb
- gnuplot_5.4.5beta+dfsg1-1~jan+nur1_amd64.buildinfo
- gnuplot_5.4.5beta+dfsg1-1~jan+nur1_amd64.changes
Diff
diff --git a/NEWS b/NEWS
index 8c9f094..ef282f0 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,20 @@
+Changes in 5.4.5
+================
+* NEW "set key offset <dx>, <dy>" tweaks placement of the key
+* NEW data-driven histogram colors (variable color from extra using column)
+* CHANGE re-order 3D labels to come after pm3d depthorder surfaces
+* CHANGE hpgl: add terminal option "fontscale <value>"
+* CHANGE for nonuniform matrix data, column(0) returns linear position in matrix
+* CHANGE set pointintervalbox 0 disables drawing the background box Bug #2544
+* FIX svg: hypertext font handling
+* FIX track columnheaders of multiple data blocks in a single file Bug #2538
+* FIX Clean up positioning of polar border, raxis, and theta tics Bug #2130
+* FIX Autoscaling of logscaled raxis
+* FIX memory corruption if a small plot structure is recycled Bug #2550
+* FIX Windows qt terminal: "pause -1" should not block mousing Bug #2549
+* FIX promotion of string to integer should not assume leading 0 means octal
+ The was a regression in 5.4.4 Bug #2551
+
Changes in 5.4.4
================
* NEW plots can use arrow styles that specify "lc rgb variable"
diff --git a/PATCHLEVEL b/PATCHLEVEL
index b8626c4..7ed6ff8 100644
--- a/PATCHLEVEL
+++ b/PATCHLEVEL
@@ -1 +1 @@
-4
+5
diff --git a/RELEASE_NOTES b/RELEASE_NOTES
index db6c418..5b5a526 100644
--- a/RELEASE_NOTES
+++ b/RELEASE_NOTES
@@ -1,11 +1,11 @@
- Gnuplot Version 5.4.4 Release Notes
+ Gnuplot Version 5.4.5 Release Notes
===================================
-This release contains bug fixes and a few changes back-ported from the
-development version. The most noticeable is probably a set of changes to
-make page layout of 3D plots after "set view map; splot ..." more like
-the corresponding page layout of 2D plots, including display of x2 and y2
-axis labels.
+The 5.4.5 patchlevel release contains bug fixes for a serious regression
+in 5.4.4 and for a long-standing problem with the Windows qt terminal.
+
+It also adds two new features back-ported from the development version,
+"set key offset" and data-driven histogram coloring.
Gnuplot development is tracked in a git repository on SourceForge.
You can generate a complete history of changes using "git log"
@@ -13,7 +13,24 @@ after downloading:
git clone -b branch-5-4-stable git://git.code.sf.net/p/gnuplot/gnuplot-main
-Release Notes date: 10-Jul-2022
+Release Notes date: 22-Sep-2022
+
+Changes in 5.4.5
+================
+* NEW "set key offset <dx>, <dy>" tweaks placement of the key
+* NEW data-driven histogram colors (variable color from extra using column)
+* CHANGE re-order drawing 3D labels to come after pm3d depthorder surfaces
+* CHANGE hpgl: add terminal option "fontscale <value>"
+* CHANGE for nonuniform matrix data, column(0) returns linear position in matrix
+* CHANGE set pointintervalbox 0 disables drawing the background box Bug #2544
+* FIX svg: hypertext font handling
+* FIX track columnheaders of multiple data blocks in a single file Bug #2538
+* FIX Clean up positioning of polar border, raxis, and theta tics Bug #2130
+* FIX Autoscaling of logscaled raxis
+* FIX memory corruption if a small plot structure is recycled Bug #2550
+* FIX regression in 5.4.4 - promotion of string to integer should
+ should not assume that a leading 0 means octal Bug #2551
+* FIX Windows qt: "pause -1" should not block mousing Bug #2549
Changes in 5.4.4
================
diff --git a/configure b/configure
index 207c349..89abddf 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.70 for gnuplot 5.4.4.
+# Generated by GNU Autoconf 2.70 for gnuplot 5.4.5.
#
#
# Copyright (C) 1992-1996, 1998-2017, 2020 Free Software Foundation, Inc.
@@ -607,8 +607,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='gnuplot'
PACKAGE_TARNAME='gnuplot'
-PACKAGE_VERSION='5.4.4'
-PACKAGE_STRING='gnuplot 5.4.4'
+PACKAGE_VERSION='5.4.5'
+PACKAGE_STRING='gnuplot 5.4.5'
PACKAGE_BUGREPORT=''
PACKAGE_URL=''
@@ -1449,7 +1449,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.4.4 to adapt to many kinds of systems.
+\`configure' configures gnuplot 5.4.5 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1520,7 +1520,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of gnuplot 5.4.4:";;
+ short | recursive ) echo "Configuration of gnuplot 5.4.5:";;
esac
cat <<\_ACEOF
@@ -1696,7 +1696,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-gnuplot configure 5.4.4
+gnuplot configure 5.4.5
generated by GNU Autoconf 2.70
Copyright (C) 2020 Free Software Foundation, Inc.
@@ -2327,7 +2327,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.4.4, which was
+It was created by gnuplot $as_me 5.4.5, which was
generated by GNU Autoconf 2.70. Invocation command line was
$ $0$ac_configure_args_raw
@@ -3834,7 +3834,7 @@ fi
# Define the identity of the package.
PACKAGE='gnuplot'
- VERSION='5.4.4'
+ VERSION='5.4.5'
printf "%s\n" "#define PACKAGE \"$PACKAGE\"" >>confdefs.h
@@ -17410,7 +17410,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.4.4, which was
+This file was extended by gnuplot $as_me 5.4.5, which was
generated by GNU Autoconf 2.70. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -17478,7 +17478,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config='$ac_cs_config_escaped'
ac_cs_version="\\
-gnuplot config.status 5.4.4
+gnuplot config.status 5.4.5
configured by $0, generated by GNU Autoconf 2.70,
with options \\"\$ac_cs_config\\"
diff --git a/configure.ac b/configure.ac
index a8ffebd..22fc517 100644
--- a/configure.ac
+++ b/configure.ac
@@ -5,7 +5,7 @@ dnl NB: Change version/patchlevel immediately below
dnl and also in PATCHLEVEL and src/version.c
dnl
-AC_INIT(gnuplot, 5.4.4)
+AC_INIT(gnuplot, 5.4.5)
AC_CONFIG_SRCDIR(src/graphics.c)
AC_PREREQ([2.69])
diff --git a/debian/changelog b/debian/changelog
index 71e17d0..a43d546 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+gnuplot (5.4.5beta+dfsg1-1) UNRELEASED; urgency=low
+
+ * New upstream release.
+
+ -- Debian Janitor <janitor@jelmer.uk> Thu, 03 Nov 2022 10:28:47 -0000
+
gnuplot (5.4.4+dfsg1-2) unstable; urgency=medium
* Team upload.
diff --git a/debian/patches/04_fix_libexecdir.diff b/debian/patches/04_fix_libexecdir.diff
index 7f3e004..bb26b85 100644
--- a/debian/patches/04_fix_libexecdir.diff
+++ b/debian/patches/04_fix_libexecdir.diff
@@ -2,10 +2,10 @@ Description: fix libexecdir
Author: Anton Gladky <gladk@debian.org>
Last-Update: 2015-06-16
-Index: gnuplot-5.4.4/src/Makefile.am
+Index: gnuplot.git/src/Makefile.am
===================================================================
---- gnuplot-5.4.4.orig/src/Makefile.am
-+++ gnuplot-5.4.4/src/Makefile.am
+--- gnuplot.git.orig/src/Makefile.am
++++ gnuplot.git/src/Makefile.am
@@ -2,7 +2,7 @@
AUTOMAKE_OPTIONS = foreign subdir-objects
diff --git a/debian/patches/07_doc.patch b/debian/patches/07_doc.patch
index 921a40a..a195905 100644
--- a/debian/patches/07_doc.patch
+++ b/debian/patches/07_doc.patch
@@ -2,10 +2,10 @@ Description: Fix path in documentation generation
Author: Anton Gladky <gladk@debian.org>
Last-Update: 2015-06-16
-Index: gnuplot-5.4.4/docs/Makefile.am
+Index: gnuplot.git/docs/Makefile.am
===================================================================
---- gnuplot-5.4.4.orig/docs/Makefile.am
-+++ gnuplot-5.4.4/docs/Makefile.am
+--- gnuplot.git.orig/docs/Makefile.am
++++ gnuplot.git/docs/Makefile.am
@@ -326,7 +326,7 @@ ${ELCS}: gnuplot-eldoc.el
# that only appears to work with a non-generated texi file for input.
diff --git a/debian/patches/08_disable_demo_plugin.patch b/debian/patches/08_disable_demo_plugin.patch
index 49f270e..e4f8ffd 100644
--- a/debian/patches/08_disable_demo_plugin.patch
+++ b/debian/patches/08_disable_demo_plugin.patch
@@ -5,10 +5,10 @@ Description: temporarily disable demo plugin
Author: Anton Gladky <gladk@debian.org>
Last-Update: 2015-06-16
-Index: gnuplot-5.4.4/demo/Makefile.in
+Index: gnuplot.git/demo/Makefile.in
===================================================================
---- gnuplot-5.4.4.orig/demo/Makefile.in
-+++ gnuplot-5.4.4/demo/Makefile.in
+--- gnuplot.git.orig/demo/Makefile.in
++++ gnuplot.git/demo/Makefile.in
@@ -337,7 +337,6 @@ epslatex.ps epslatex.tex random.tmp stri
BINARY_FILES = binary1 binary2 binary3
@@ -25,10 +25,10 @@ Index: gnuplot-5.4.4/demo/Makefile.in
all: all-recursive
.SUFFIXES:
-Index: gnuplot-5.4.4/demo/Makefile.am
+Index: gnuplot.git/demo/Makefile.am
===================================================================
---- gnuplot-5.4.4.orig/demo/Makefile.am
-+++ gnuplot-5.4.4/demo/Makefile.am
+--- gnuplot.git.orig/demo/Makefile.am
++++ gnuplot.git/demo/Makefile.am
@@ -9,7 +9,6 @@ epslatex.ps epslatex.tex random.tmp stri
BINARY_FILES = binary1 binary2 binary3
@@ -44,10 +44,10 @@ Index: gnuplot-5.4.4/demo/Makefile.am
-if BUILD_PLUGIN
-PLUGIN_DIR = plugin
-endif
-Index: gnuplot-5.4.4/demo/Makefile.am.in
+Index: gnuplot.git/demo/Makefile.am.in
===================================================================
---- gnuplot-5.4.4.orig/demo/Makefile.am.in
-+++ gnuplot-5.4.4/demo/Makefile.am.in
+--- gnuplot.git.orig/demo/Makefile.am.in
++++ gnuplot.git/demo/Makefile.am.in
@@ -9,7 +9,6 @@ epslatex.ps epslatex.tex random.tmp stri
BINARY_FILES = binary1 binary2 binary3
diff --git a/debian/patches/09_remove_beos.patch b/debian/patches/09_remove_beos.patch
index f3d3042..4da9435 100644
--- a/debian/patches/09_remove_beos.patch
+++ b/debian/patches/09_remove_beos.patch
@@ -2,10 +2,10 @@ Description: remove beos-specific code
Author: Anton Gladky <gladk@debian.org>
Last-Update: 2015-06-16
-Index: gnuplot-5.4.4/src/Makefile.am
+Index: gnuplot.git/src/Makefile.am
===================================================================
---- gnuplot-5.4.4.orig/src/Makefile.am
-+++ gnuplot-5.4.4/src/Makefile.am
+--- gnuplot.git.orig/src/Makefile.am
++++ gnuplot.git/src/Makefile.am
@@ -77,11 +77,7 @@ getcolor_x11.o: getcolor.c
bf_test_SOURCES = bf_test.c
bf_test_LIBS = -lm
@@ -19,10 +19,10 @@ Index: gnuplot-5.4.4/src/Makefile.am
EXTRA_gnuplot_SOURCES = strftime.c vms.c vms.h
-Index: gnuplot-5.4.4/configure.ac
+Index: gnuplot.git/configure.ac
===================================================================
---- gnuplot-5.4.4.orig/configure.ac
-+++ gnuplot-5.4.4/configure.ac
+--- gnuplot.git.orig/configure.ac
++++ gnuplot.git/configure.ac
@@ -188,7 +188,6 @@ GP_MSDOS
GP_APPLE
GP_BEOS
diff --git a/debian/patches/10_removepicins.patch b/debian/patches/10_removepicins.patch
index 214284b..51679bd 100644
--- a/debian/patches/10_removepicins.patch
+++ b/debian/patches/10_removepicins.patch
@@ -2,10 +2,10 @@ Description: removes picins latex include
Author: Anton Gladky <gladk@debian.org>
Last-Update: 2015-06-16
-Index: gnuplot-5.4.4/docs/Makefile.am
+Index: gnuplot.git/docs/Makefile.am
===================================================================
---- gnuplot-5.4.4.orig/docs/Makefile.am
-+++ gnuplot-5.4.4/docs/Makefile.am
+--- gnuplot.git.orig/docs/Makefile.am
++++ gnuplot.git/docs/Makefile.am
@@ -191,7 +191,6 @@ gnuplot.pdf: figures.tex pdf_figures $(s
touch figures.idx ; \
rm -f pdffigures.tex ; \
@@ -14,10 +14,10 @@ Index: gnuplot-5.4.4/docs/Makefile.am
) ; \
TEXINPUTS=.:$(srcdir):$(top_srcdir):${TEXINPUTS}: $(PDFLATEX) $< ; \
TEXINPUTS=.:$(srcdir):$(top_srcdir):${TEXINPUTS}: $(PDFLATEX) $< ; \
-Index: gnuplot-5.4.4/docs/doc2tex.c
+Index: gnuplot.git/docs/doc2tex.c
===================================================================
---- gnuplot-5.4.4.orig/docs/doc2tex.c
-+++ gnuplot-5.4.4/docs/doc2tex.c
+--- gnuplot.git.orig/docs/doc2tex.c
++++ gnuplot.git/docs/doc2tex.c
@@ -166,12 +166,6 @@ process_line( char *line, FILE *b)
break;
diff --git a/debian/patches/11_fix_linkage_wx.patch b/debian/patches/11_fix_linkage_wx.patch
index 4ade04d..6a921a3 100644
--- a/debian/patches/11_fix_linkage_wx.patch
+++ b/debian/patches/11_fix_linkage_wx.patch
@@ -2,10 +2,10 @@ Description: Add missing linkage against X11 libs.
Author: Anton Gladky <gladk@debian.org>
Last-Update: 2015-06-16
-Index: gnuplot-5.4.4/src/Makefile.am
+Index: gnuplot.git/src/Makefile.am
===================================================================
---- gnuplot-5.4.4.orig/src/Makefile.am
-+++ gnuplot-5.4.4/src/Makefile.am
+--- gnuplot.git.orig/src/Makefile.am
++++ gnuplot.git/src/Makefile.am
@@ -91,6 +91,8 @@ $(EXTRA_gnuplot_SOURCES)
if BUILD_WXWIDGETS
diff --git a/debian/patches/13_honour_SOURCE_DATE_EPOCH.patch b/debian/patches/13_honour_SOURCE_DATE_EPOCH.patch
index 2a2212a..06bc1d0 100644
--- a/debian/patches/13_honour_SOURCE_DATE_EPOCH.patch
+++ b/debian/patches/13_honour_SOURCE_DATE_EPOCH.patch
@@ -4,10 +4,10 @@ Description: Honour SOURCE_DATE_EPOCH
See https://reproducible-builds.org/specs/source-date-epoch/
Author: Alexis Bienvenüe <pado@passoire.fr>
-Index: gnuplot-5.4.4/term/post.trm
+Index: gnuplot.git/term/post.trm
===================================================================
---- gnuplot-5.4.4.orig/term/post.trm
-+++ gnuplot-5.4.4/term/post.trm
+--- gnuplot.git.orig/term/post.trm
++++ gnuplot.git/term/post.trm
@@ -1670,15 +1670,45 @@ end\n\
int i;
time_t now;
diff --git a/debian/patches/20_fix_pdf-compilation.patch b/debian/patches/20_fix_pdf-compilation.patch
index d0a4fc0..0e0e855 100644
--- a/debian/patches/20_fix_pdf-compilation.patch
+++ b/debian/patches/20_fix_pdf-compilation.patch
@@ -3,8 +3,10 @@ Author: Anton Gladky <gladk@debian.org>
Bug-Debian: https://bugs.debian.org/1016323
Last-Update: 2022-08-19
---- gnuplot-5.4.4+dfsg1.orig/docs/titlepag.tex
-+++ gnuplot-5.4.4+dfsg1/docs/titlepag.tex
+Index: gnuplot.git/docs/titlepag.tex
+===================================================================
+--- gnuplot.git.orig/docs/titlepag.tex
++++ gnuplot.git/docs/titlepag.tex
@@ -13,7 +13,7 @@
\documentclass[twoside]{article}
\usepackage{toc_entr}
@@ -14,8 +16,10 @@ Last-Update: 2022-08-19
\usepackage{textgreek}
\usepackage[
---- gnuplot-5.4.4+dfsg1.orig/src/encoding.c
-+++ gnuplot-5.4.4+dfsg1/src/encoding.c
+Index: gnuplot.git/src/encoding.c
+===================================================================
+--- gnuplot.git.orig/src/encoding.c
++++ gnuplot.git/src/encoding.c
@@ -347,7 +347,7 @@ latex_input_encoding(enum set_encoding_i
break;
case S_ENC_UTF8:
@@ -25,8 +29,10 @@ Last-Update: 2022-08-19
break;
case S_ENC_INVALID:
int_error(NO_CARET, "invalid input encoding used");
---- gnuplot-5.4.4+dfsg1.orig/term/lua/gnuplot-tikz.lua
-+++ gnuplot-5.4.4+dfsg1/term/lua/gnuplot-tikz.lua
+Index: gnuplot.git/term/lua/gnuplot-tikz.lua
+===================================================================
+--- gnuplot.git.orig/term/lua/gnuplot-tikz.lua
++++ gnuplot.git/term/lua/gnuplot-tikz.lua
@@ -1330,7 +1330,7 @@ gfx.format.latex = {
docheader = "\\documentclass["..pgf.DEFAULT_FONT_SIZE.."pt]{article}\n"
.."\\usepackage[T1]{fontenc}\n"
@@ -36,9 +42,11 @@ Last-Update: 2022-08-19
.."\\SetUnicodeOption{mathletters}\n\n"
.."\\usepackage{"..pgf.STYLE_FILE_BASENAME.."}\n"
.."\\pagestyle{empty}\n"
---- gnuplot-5.4.4+dfsg1.orig/docs/gnuplot.doc
-+++ gnuplot-5.4.4+dfsg1/docs/gnuplot.doc
-@@ -4730,7 +4730,6 @@ Ffigure_labels2
+Index: gnuplot.git/docs/gnuplot.doc
+===================================================================
+--- gnuplot.git.orig/docs/gnuplot.doc
++++ gnuplot.git/docs/gnuplot.doc
+@@ -4741,7 +4741,6 @@ Ffigure_labels2
one of them to each point in a plot based on the value in data column 3:
set encoding utf8
@@ -46,7 +54,7 @@ Last-Update: 2022-08-19
splot 'file' using 1:2:(symbol($3)) with labels
This example shows use of labels with variable rotation angle in column 4 and
-@@ -11611,7 +11610,7 @@ Ffigure_multiple_keys
+@@ -11631,7 +11630,7 @@ Ffigure_multiple_keys
generate axis tic labels. The C library routine always use a hyphen character
(ascii \055) to indicate a negative number, as in -7. Many people prefer a
different typographic minus sign character (unicode U+2212) for this purpose,
diff --git a/docs/gnuplot.doc b/docs/gnuplot.doc
index 355e6e5..d5a0da9 100644
--- a/docs/gnuplot.doc
+++ b/docs/gnuplot.doc
@@ -355,6 +355,17 @@ C
#b (5.4.2) "plot with fillsteps {above|below y=<value>}" analogous to filledcurves
#b (5.4.3) "nogrid" flag allows splot components to opt out of dgrid3d processing
#b (5.4.3) "set style histogram nokeyseparators" (see `newhistogram`)
+#b (5.4.5) column(0) returns the linear ordering of nonuniform matrix elements.
+## Thus for element A[i,j] in an MxN matrix,
+## column(0) / M gives the row index i
+## column(0) % M gives the column index j
+#b (5.4.5) The position of the key box can be manually tweaked by giving an
+## offset added to whatever position the program would otherwise use.
+## See `set key offset`.
+#b (5.4.5) Component boxes in "plot with histograms" can be colored according to
+## a separate column of category/color information. See `lc variable`.
+#b (5.4.5) Fix a regression in version 5.4.4 that caused string->int promotion
+## to incorrectly assume a leading 0 implies an octal number
#end
4 Changes
@@ -10874,6 +10885,7 @@ Ffigure_missing
{{no}box {linestyle <style> | linetype <type> | linewidth <width>}}
{maxcols {<max no. of columns> | auto}}
{maxrows {<max no. of rows> | auto}}
+ {offset <dx>, <dy>}
unset key
show key
@@ -11100,6 +11112,14 @@ Ffigure_keyentry
is given is to align the key as though it were text positioned using the
label command, i.e., `left` means left align with key to the right of
<position>, etc.
+4 key offset
+?commands set key offset
+?set key offset
+?key offset
+ Regardless of the key placement options chosen, the final position of the key
+ can be adjusted manually by specifying an offset. As usual, the x and y
+ components of the offset may be given in character, graph, or screen
+ coordinates.
4 key samples
?commands set key samples
?set key samples
diff --git a/docs/titlepag.tex b/docs/titlepag.tex
index 6745cba..2c9d945 100644
--- a/docs/titlepag.tex
+++ b/docs/titlepag.tex
@@ -171,7 +171,7 @@
\vspace{2ex}
% July 2020 Version 5.4
- Version {\gpVersion} (Jun 2022)
+ Version {\gpVersion} (September 2022)
\end{center}
\newpage
diff --git a/src/axis.c b/src/axis.c
index f1497f9..ea9f702 100644
--- a/src/axis.c
+++ b/src/axis.c
@@ -731,19 +731,23 @@ make_tics(struct axis *this_axis, int guide)
xr = fabs(this_axis->min - this_axis->max);
if (xr == 0)
return 1; /* Anything will do, since we'll never use it */
- if (xr >= VERYLARGE)
- int_warn(NO_CARET,"%s axis range undefined or overflow",
- axis_name(this_axis->index));
+ if (xr >= VERYLARGE) {
+ int_warn(NO_CARET, "%s axis range undefined or overflow, resetting to [0:0]",
+ axis_name(this_axis->index));
+ /* FIXME: this used to be int_error but there were false positives
+ * (bad range on unused axis). However letting +/-VERYLARGE through
+ * can overrun data structures for time conversions. min = max avoids this.
+ */
+ this_axis->min = this_axis->max = 0;
+ }
+
tic = quantize_normal_tics(xr, guide);
- /* FIXME HBB 20010831: disabling this might allow short log axis
- * to receive better ticking... */
if (this_axis->log && tic < 1.0)
tic = 1.0;
-
if (this_axis->tictype == DT_TIMEDATE)
- return quantize_time_tics(this_axis, tic, xr, guide);
- else
- return tic;
+ tic = quantize_time_tics(this_axis, tic, xr, guide);
+
+ return tic;
}
/* }}} */
@@ -2675,7 +2679,7 @@ polar_to_xy( double theta, double r, double *x, double *y, TBOOLEAN update)
if (R_AXIS.autoscale & AUTOSCALE_MAX) {
if ((R_AXIS.max_constraint & CONSTRAINT_UPPER)
&& (R_AXIS.max_ub < r))
- R_AXIS.max = R_AXIS.max_ub;
+ R_AXIS.max = R_AXIS.max_ub;
else
R_AXIS.max = r;
} else {
@@ -2689,8 +2693,11 @@ polar_to_xy( double theta, double r, double *x, double *y, TBOOLEAN update)
AXIS *shadow = R_AXIS.linked_to_primary;
if (R_AXIS.log && r <= 0)
r = not_a_number();
- else
+ else {
r = eval_link_function(shadow, r) - shadow->min;
+ if (update && (R_AXIS.autoscale & AUTOSCALE_MAX) && r > shadow->max)
+ shadow->max = r;
+ }
} else if (inverted_raxis) {
r = R_AXIS.set_min - r;
} else if ((R_AXIS.autoscale & AUTOSCALE_MIN)) {
diff --git a/src/boundary.c b/src/boundary.c
index a88ce2a..91620d0 100644
--- a/src/boundary.c
+++ b/src/boundary.c
@@ -35,6 +35,7 @@
#include "alloc.h"
#include "axis.h"
#include "misc.h"
+#include "plot2d.h"
#include "pm3d.h" /* for is_plot_with_palette */
#define ERRORBARTIC GPMAX((t->h_tic/2),1)
@@ -632,9 +633,14 @@ boundary(struct curve_points *plots, int count)
R_AXIS.max = axis_array[FIRST_X_AXIS].max;
int_warn(NO_CARET, "resetting rrange");
}
+
setup_tics(&axis_array[POLAR_AXIS], 10);
- }
+ /* DEBUG: setup_tics may extend rrange to next tic, in which case the
+ * previous x/y range limits from polar_range_fiddling are out of date.
+ */
+ polar_range_fiddling(&axis_array[FIRST_X_AXIS], &axis_array[FIRST_Y_AXIS]);
+ }
/* Modify the bounding box to fit the aspect ratio, if any was given */
if (aspect_ratio != 0.0) {
@@ -840,6 +846,7 @@ void
do_key_bounds(legend_key *key)
{
struct termentry *t = term;
+ double dx, dy;
key_height = key_title_height + key_title_extra
+ key_rows * key_entry_height + key->height_fix * key_entry_height;
@@ -948,6 +955,15 @@ do_key_bounds(legend_key *key)
key->bounds.ytop += key_height;
key->bounds.ybot = key->bounds.ytop - key_height;
}
+
+ /* Regardless of how the key was nominally positioned,
+ * the result can be manually tweaked by "set key offset dx, dy"
+ */
+ map_position_r(&key->offset, &dx, &dy, "key");
+ key->bounds.ytop += dy;
+ key->bounds.ybot += dy;
+ key->bounds.xleft += dx;
+ key->bounds.xright += dx;
}
/* Calculate positioning of components that make up the key box */
@@ -1144,6 +1160,8 @@ find_maxl_keys(struct curve_points *plots, int count, int *kcnt)
&& !this_plot->title_position) {
if (this_plot->plot_style == SPIDERPLOT && this_plot->plot_type != KEYENTRY)
; /* Nothing */
+ if (this_plot->plot_style == HISTOGRAMS && this_plot->histogram->type == HT_STACKED_IN_TOWERS)
+ ; /* These titles are placed as xtics rather than in the key */
else {
ignore_enhanced(this_plot->title_no_enhanced);
len = estimate_strlen(this_plot->title, NULL);
diff --git a/src/command.c b/src/command.c
index 5fe706a..2bf34d9 100644
--- a/src/command.c
+++ b/src/command.c
@@ -1835,12 +1835,17 @@ pause_command()
/* Use of fprintf() triggers a bug in MinGW + SJIS encoding */
fputs(buf, stderr); fputs("\n", stderr);
}
- /* cannot use EAT_INPUT_WITH here */
- do {
- junk = getch();
- if (ctrlc_flag)
- bail_to_command_line();
- } while (junk != EOF && junk != '\n' && junk != '\r');
+ /* Note: cannot use EAT_INPUT_WITH here
+ * FIXME: probably term->waitforinput is always correct, not just for qt
+ */
+ if (!strcmp(term->name,"qt"))
+ term->waitforinput(0);
+ else
+ do {
+ junk = getch();
+ if (ctrlc_flag)
+ bail_to_command_line();
+ } while (junk != EOF && junk != '\n' && junk != '\r');
} else /* paused_for_mouse */
# endif /* !WGP_CONSOLE */
{
diff --git a/src/datafile.c b/src/datafile.c
index ce7ad93..6aa9e02 100644
--- a/src/datafile.c
+++ b/src/datafile.c
@@ -1907,6 +1907,13 @@ df_readascii(double v[], int max)
return DF_EOF;
}
+ /* start of a new data block that might have column headers */
+ if (((&keyT)->auto_titles == COLUMNHEAD_KEYTITLES)
+ || (df_columnheaders)) {
+ parse_1st_row_as_headers = TRUE;
+ df_already_got_headers = FALSE;
+ }
+
/* ignore line if current_index has just become
* first required one - client doesn't want this
* blank line. While we're here, check for <=
@@ -2047,6 +2054,7 @@ df_readascii(double v[], int max)
column_for_key_title = df_no_cols;
if (column_for_key_title > 0) {
+ free(df_key_title);
df_key_title = gp_strdup(df_column[column_for_key_title-1].header);
if (!df_key_title) {
FPRINTF((stderr,
@@ -5198,7 +5206,16 @@ df_readbinary(double v[], int max)
{
int j;
- df_datum = df_column[i].datum;
+ /* df_datum will be returned as column(0)
+ * Aug 2022: CHANGE
+ * I do not know why the original code set this to df_column[i].datum.
+ * Returning the linear order in the matrix is more useful for both
+ * ascii and binary nonuniform matrices.
+ */
+ if (df_nonuniform_matrix)
+ df_datum++;
+ else
+ df_datum = df_column[i].datum;
/* Fill backward so that current read value is not
* overwritten. */
diff --git a/src/eval.c b/src/eval.c
index ec41f79..b0df697 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -522,10 +522,15 @@ pop_or_convert_from_string(struct value *v)
char trailing = *eov;
/* If the string contains no decimal point, try to interpret it as an integer.
- * strtoll handles decimal, octal, and hexadecimal.
+ * We treat a string starting with "0x" as a hexadecimal; everything else
+ * as decimal. So int("010") promotes to 10, not 8.
*/
if (strcspn(string, ".") == strlen(string)) {
- long long li = strtoll( string, &eov, 0 );
+ long long li;
+ if (string[0] == '0' && string[1] == 'x')
+ li = strtoll( string, &eov, 16 );
+ else
+ li = strtoll( string, &eov, 10 );
trailing = *eov;
Ginteger(v, li);
}
@@ -542,7 +547,7 @@ pop_or_convert_from_string(struct value *v)
if (eov == string)
int_error(NO_CARET,"Non-numeric string found where a numeric expression was expected");
if (trailing && !isspace(trailing))
- int_error(NO_CARET,"Trailing characters after numeric expression");
+ int_warn(NO_CARET,"Trailing characters after numeric expression");
}
return(v);
}
diff --git a/src/gadgets.h b/src/gadgets.h
index e23065b..a2b271c 100644
--- a/src/gadgets.h
+++ b/src/gadgets.h
@@ -272,8 +272,15 @@ typedef struct {
} filledcurves_opts;
#define EMPTY_FILLEDCURVES_OPTS { FILLEDCURVES_DEFAULT, 0.0, 0.0, 0 }
+typedef enum histogram_type {
+ HT_NONE,
+ HT_STACKED_IN_LAYERS,
+ HT_STACKED_IN_TOWERS,
+ HT_CLUSTERED,
+ HT_ERRORBARS
+} t_histogram_type;
typedef struct histogram_style {
- int type; /* enum t_histogram_type */
+ t_histogram_type type; /* enum t_histogram_type */
int gap; /* set style hist gap <n> (space between clusters) */
int clustersize; /* number of datasets in this histogram */
TBOOLEAN keyentry; /* FALSE suppresses extra blank line in key */
@@ -285,13 +292,6 @@ typedef struct histogram_style {
struct histogram_style *next;
struct text_label title;
} histogram_style;
-typedef enum histogram_type {
- HT_NONE,
- HT_STACKED_IN_LAYERS,
- HT_STACKED_IN_TOWERS,
- HT_CLUSTERED,
- HT_ERRORBARS
-} t_histogram_type;
#define DEFAULT_HISTOGRAM_STYLE { HT_CLUSTERED, 2, 1, TRUE, 0.0, 0.0, LT_UNDEFINED, LT_UNDEFINED, 0, NULL, EMPTY_LABELSTRUCT }
typedef enum en_boxplot_factor_labels {
@@ -374,6 +374,7 @@ typedef struct {
int maxcols; /* maximum no of columns for horizontal keys */
int maxrows; /* maximum no of rows for vertical keys */
text_label title; /* holds title line for the key as a whole */
+ struct position offset; /* manual displacement of the entire key */
} legend_key;
extern legend_key keyT;
@@ -395,7 +396,9 @@ extern legend_key keyT;
NULL, {TC_LT, LT_BLACK, 0.0}, \
BACKGROUND_COLORSPEC, \
{0,0,0,0}, 0, 0, \
- EMPTY_LABELSTRUCT}
+ EMPTY_LABELSTRUCT, \
+ {character, character, character, 0, 0, 0}, \
+ }
/*
diff --git a/src/graph3d.c b/src/graph3d.c
index cdbfa4e..3957613 100644
--- a/src/graph3d.c
+++ b/src/graph3d.c
@@ -585,6 +585,13 @@ place_labels3d(struct text_label *listhead, int layer)
term->pointsize(pointsize);
+ /* Hypertext labels? */
+ /* NB: currently svg is the only terminal that needs this extra step */
+ if (layer == LAYER_PLOTLABELS && listhead && listhead->hypertext
+ && term->hypertext) {
+ term->hypertext(TERM_HYPERTEXT_FONT, listhead->font);
+ }
+
for (this_label = listhead;
this_label != NULL;
this_label = this_label->next) {
@@ -1229,6 +1236,8 @@ do_3dplot(
break;
if (draw_contour && !(this_plot->opt_out_of_contours))
break;
+ if (pm3d_order_depth || track_pm3d_quadrangles)
+ break;
place_labels3d(this_plot->labels->next, LAYER_PLOTLABELS);
}
break;
@@ -1514,6 +1523,17 @@ do_3dplot(
(term->layer)(TERM_LAYER_AFTER_PLOT);
}
+ /* Add labels that were defered until after depth-sorted pm3d surfaces */
+ if (!key_pass)
+ if ((pm3d_order_depth || track_pm3d_quadrangles) && !hidden3d) {
+ this_plot = plots;
+ for (surface = 0; surface < pcount; this_plot = this_plot->next_sp, surface++) {
+ if (this_plot->plot_style == LABELPOINTS)
+ if (!draw_contour || this_plot->opt_out_of_contours)
+ place_labels3d(this_plot->labels->next, LAYER_PLOTLABELS);
+ }
+ }
+
/* Draw grid and border.
* The 1st case allows "set border behind" to override hidden3d processing.
* The 2nd case either leaves everything to hidden3d or forces it to the front.
@@ -1550,7 +1570,7 @@ do_3dplot(
/* Grid walls */
place_objects(grid_wall, LAYER_FRONT, 3);
- /* PLACE LABELS */
+ /* Add 'front' labels */
place_labels3d(first_label, LAYER_FRONT);
/* PLACE ARROWS */
@@ -4122,6 +4142,7 @@ do_3dkey_layout(legend_key *key, int *xinkey, int *yinkey)
{
struct termentry *t = term;
int key_height, key_width;
+ int dx, dy;
/* NOTE: All of these had better not change after being calculated here! */
if (key->reverse) {
@@ -4268,6 +4289,17 @@ do_3dkey_layout(legend_key *key, int *xinkey, int *yinkey)
/* Center the key entries vertically, allowing for requested extra space */
*yinkey -= (key->height_fix * t->v_char) / 2;
+
+ /* Regardless of how the key was nominally positioned,
+ * the result can be manually tweaked by "set key offset dx, dy"
+ */
+ map3d_position_r(&key->offset, &dx, &dy, "key");
+ key->bounds.ytop += dy;
+ key->bounds.ybot += dy;
+ key->bounds.xleft += dx;
+ key->bounds.xright += dx;
+ *xinkey += dx;
+ *yinkey += dy;
}
diff --git a/src/graphics.c b/src/graphics.c
index ada9df2..4332cf4 100644
--- a/src/graphics.c
+++ b/src/graphics.c
@@ -278,7 +278,7 @@ place_grid(int layer)
/* POLAR GRID tickmarks along the perimeter of the outer circle */
if (THETA_AXIS.ticmode) {
term_apply_lp_properties(&border_lp);
- if (largest_polar_circle <= 0)
+ if (draw_border & 0x1000)
largest_polar_circle = polar_radius(R_AXIS.max);
copy_or_invent_formatstring(&THETA_AXIS);
gen_tics(&THETA_AXIS, ttick_callback);
@@ -2216,6 +2216,7 @@ plot_boxes(struct curve_points *plot, int xaxis_y)
break;
case HT_CLUSTERED:
case HT_ERRORBARS:
+ case HT_NONE:
break;
}
}
@@ -2245,6 +2246,7 @@ plot_boxes(struct curve_points *plot, int xaxis_y)
/* Variable color */
if (plot->plot_style == BOXES || plot->plot_style == BOXXYERROR
+ || plot->plot_style == HISTOGRAMS
|| plot->plot_style == BOXERROR) {
check_for_variable_color(plot, &plot->varcolor[i]);
}
@@ -2420,10 +2422,12 @@ plot_points(struct curve_points *plot)
/* term_apply_lp_properties will restore the point type and size*/
if ((plot->plot_style == LINESPOINTS && interval < 0)
|| (plot->plot_style == YERRORBARS)) {
- (*t->set_color)(&background_fill);
- (*t->pointsize)(pointsize * pointintervalbox);
- (*t->point) (x, y, 6);
- term_apply_lp_properties(&(plot->lp_properties));
+ if (pointintervalbox != 0) {
+ (*t->set_color)(&background_fill);
+ (*t->pointsize)(pointsize * pointintervalbox);
+ (*t->point) (x, y, 6);
+ term_apply_lp_properties(&(plot->lp_properties));
+ }
}
/* rgb variable - color read from data column */
@@ -4016,10 +4020,7 @@ plot_border()
/* Full-width circular border is visually too heavy compared to the edges */
polar_border.l_width = polar_border.l_width / 2.;
term_apply_lp_properties(&polar_border);
-
- if (largest_polar_circle <= 0)
- largest_polar_circle = polar_radius(R_AXIS.max);
- draw_polar_circle(largest_polar_circle);
+ draw_polar_circle(polar_radius(R_AXIS.max));
clip_area = clip_save;
}
diff --git a/src/internal.c b/src/internal.c
index f6769b9..c995175 100644
--- a/src/internal.c
+++ b/src/internal.c
@@ -2151,12 +2151,13 @@ f_trim(union argument *arg)
s++;
/* Trim from back */
- trim = strdup(s);
+ trim = s;
s = &trim[strlen(trim)-1];
while ((s > trim) && isspace((unsigned char) *s))
*(s--) = '\0';
- free(a.v.string_val);
+ s = a.v.string_val;
a.v.string_val = trim;
push(&a);
+ free(s);
}
diff --git a/src/plot2d.c b/src/plot2d.c
index fdf9fd1..94ca76b 100644
--- a/src/plot2d.c
+++ b/src/plot2d.c
@@ -1752,6 +1752,8 @@ histogram_range_fiddling(struct curve_points *plot)
axis_array[plot->y_axis].min = ylow;
}
break;
+ default:
+ break;
}
}
@@ -1761,21 +1763,26 @@ histogram_range_fiddling(struct curve_points *plot)
* resulting plot will not be centered at the origin.
*/
void
-polar_range_fiddling(struct curve_points *plot)
+polar_range_fiddling(struct axis *xaxis, struct axis *yaxis)
{
if (axis_array[POLAR_AXIS].set_autoscale & AUTOSCALE_MAX) {
- double plotmax_x, plotmax_y, plotmax;
- plotmax_x = GPMAX(axis_array[plot->x_axis].max, -axis_array[plot->x_axis].min);
- plotmax_y = GPMAX(axis_array[plot->y_axis].max, -axis_array[plot->y_axis].min);
+ double plotmax_x, plotmax_y, plotmax_r, plotmax;
+ plotmax_x = GPMAX(xaxis->max, -xaxis->min);
+ plotmax_y = GPMAX(yaxis->max, -yaxis->min);
plotmax = GPMAX(plotmax_x, plotmax_y);
- if ((axis_array[plot->x_axis].set_autoscale & AUTOSCALE_BOTH) == AUTOSCALE_BOTH) {
- axis_array[plot->x_axis].max = plotmax;
- axis_array[plot->x_axis].min = -plotmax;
+ plotmax_r = (axis_array[POLAR_AXIS].log)
+ ? axis_array[POLAR_AXIS].linked_to_primary->max
+ : axis_array[POLAR_AXIS].max;
+ plotmax = GPMAX(plotmax, plotmax_r);
+
+ if ((xaxis->set_autoscale & AUTOSCALE_BOTH) == AUTOSCALE_BOTH) {
+ xaxis->max = plotmax;
+ xaxis->min = -plotmax;
}
- if ((axis_array[plot->y_axis].set_autoscale & AUTOSCALE_BOTH) == AUTOSCALE_BOTH) {
- axis_array[plot->y_axis].max = plotmax;
- axis_array[plot->y_axis].min = -plotmax;
+ if ((yaxis->set_autoscale & AUTOSCALE_BOTH) == AUTOSCALE_BOTH) {
+ yaxis->max = plotmax;
+ yaxis->min = -plotmax;
}
}
}
@@ -2104,12 +2111,14 @@ eval_plots()
newhist_pattern = fs.fillpattern;
if (!equals(c_token,","))
int_error(c_token,"syntax error");
+ was_definition = FALSE;
} else if (almost_equals(c_token, "newspider$plot")) {
c_token++;
paxis_current = 0;
if (!equals(c_token,","))
int_error(c_token,"syntax error (missing comma)");
+ was_definition = FALSE;
} else if (is_definition(c_token)) {
define();
@@ -2184,9 +2193,10 @@ eval_plots()
if (*name_str == '$' && !get_datablock(name_str))
int_error(c_token-1, "cannot plot voxel data");
- if (*tp_ptr)
+ if (*tp_ptr) {
this_plot = *tp_ptr;
- else { /* no memory malloc()'d there yet */
+ cp_extend(this_plot, MIN_CRV_POINTS);
+ } else {
this_plot = cp_alloc(MIN_CRV_POINTS);
*tp_ptr = this_plot;
}
@@ -3004,8 +3014,9 @@ eval_plots()
boxplot_range_fiddling(this_plot);
if (this_plot->plot_style == IMPULSES)
impulse_range_fiddling(this_plot);
+ /* FIXME: not sure this is necessary. Only for x2 or y2 axes? */
if (polar)
- polar_range_fiddling(this_plot);
+ polar_range_fiddling(&axis_array[this_plot->x_axis], &axis_array[this_plot->y_axis]);
/* sort */
switch (this_plot->plot_smooth) {
@@ -3292,6 +3303,16 @@ eval_plots()
t_step = (t_max - t_min) / (samples_1 - 1);
}
+
+ /* If this plot structure was previously used to plot something
+ * with only a few points, the storage space is not big enough.
+ */
+ if (samples_1 > this_plot->p_max) {
+ FPRINTF((stderr,"extending plot with space for %d points to hold %d\n",
+ this_plot->p_max, samples_1+1));
+ cp_extend(this_plot, samples_1 + 1);
+ }
+
for (i = 0; i < samples_1; i++) {
double x, temp;
struct value a;
@@ -3478,7 +3499,7 @@ eval_plots()
/* This is the earliest that polar autoscaling can be done for function plots */
if (polar) {
- polar_range_fiddling(first_plot);
+ polar_range_fiddling(&axis_array[first_plot->x_axis], &axis_array[first_plot->y_axis]);
}
} /* some_functions */
diff --git a/src/plot2d.h b/src/plot2d.h
index a47ad38..5a47e5a 100644
--- a/src/plot2d.h
+++ b/src/plot2d.h
@@ -34,6 +34,9 @@
# define GNUPLOT_PLOT2D_H
#include "syscfg.h"
+#include "axis.h"
+#include "gp_types.h"
+#include "gadgets.h"
/* This allows a natural interpretation of providing only a single column in 'using' */
#define default_smooth_weight(option) \
@@ -48,13 +51,12 @@ extern struct curve_points *first_plot;
void plotrequest(void);
void refresh_bounds(struct curve_points *first_plot, int nplots);
+void polar_range_fiddling(struct axis *xaxis, struct axis *yaxis);
/* internal and external variables */
void cp_free(struct curve_points *cp);
void cp_extend(struct curve_points *cp, int num);
-#include "gp_types.h"
-#include "gadgets.h"
struct text_label *store_label(struct text_label *, struct coordinate *,
int i, char * string, double colorval);
void parse_plot_title(struct curve_points *this_plot,
diff --git a/src/save.c b/src/save.c
index 2d4b418..0c06cb2 100644
--- a/src/save.c
+++ b/src/save.c
@@ -508,6 +508,7 @@ save_set_all(FILE *fp)
key->invert ? "" : "no",
key->swidth, key->vert_factor, key->width_fix, key->height_fix);
fprintf(fp, "\nset key maxcolumns %d maxrows %d",key->maxcols,key->maxrows);
+ save_position(fp, &key->offset, 2, TRUE);
fputc('\n', fp);
if (key->front) {
fprintf(fp, "set key opaque");
diff --git a/src/set.c b/src/set.c
index 6818837..2051e49 100644
--- a/src/set.c
+++ b/src/set.c
@@ -2574,6 +2574,12 @@ set_key()
c_token--; /* will be incremented again soon */
break;
+ case S_KEY_OFFSET:
+ c_token++;
+ get_position_default(&key->offset, character, 2);
+ c_token--; /* will be incremented again soon */
+ break;
+
case S_KEY_INVALID:
default:
int_error(c_token, "unknown key option");
@@ -2814,6 +2820,13 @@ set_logscale()
axis_array[axis].set_max = 10.;
}
+ /* Autoscaled minimum cannot work with log scale R */
+ if ((axis == POLAR_AXIS) && (axis_array[axis].set_autoscale & AUTOSCALE_MIN)) {
+ axis_array[axis].set_autoscale &= ~AUTOSCALE_MIN;
+ axis_array[axis].set_min = 0.1;
+ axis_array[axis].min = 0.1;
+ }
+
if (newbase == 10.) {
sprintf(command, "set nonlinear %s via log10(%s) inv 10**%s",
axis_name(axis), dummy, dummy);
@@ -4138,7 +4151,7 @@ set_pointintervalbox()
pointintervalbox = 1.0;
else
pointintervalbox = real_expression();
- if (pointintervalbox <= 0)
+ if (pointintervalbox < 0)
pointintervalbox = 1.0;
}
diff --git a/src/show.c b/src/show.c
index e587692..0b19b6b 100644
--- a/src/show.c
+++ b/src/show.c
@@ -1925,6 +1925,8 @@ show_key()
break;
}
}
+ fputs(" offset: ", stderr);
+ show_position(&key->offset, 2);
fputs("\n", stderr);
break;
}
diff --git a/src/tables.c b/src/tables.c
index f727457..7f011d2 100644
--- a/src/tables.c
+++ b/src/tables.c
@@ -394,6 +394,7 @@ const struct gen_table set_key_tbl[] =
{ "def$ault", S_KEY_DEFAULT },
{ "on", S_KEY_ON },
{ "off", S_KEY_OFF },
+ { "offset", S_KEY_OFFSET},
{ "t$op", S_KEY_TOP },
{ "b$ottom", S_KEY_BOTTOM },
{ "l$eft", S_KEY_LEFT },
diff --git a/src/tables.h b/src/tables.h
index 04100dc..554e6a5 100644
--- a/src/tables.h
+++ b/src/tables.h
@@ -139,7 +139,7 @@ enum set_key_id {
S_KEY_AUTOTITLES, S_KEY_NOAUTOTITLES,
S_KEY_DEFAULT, S_KEY_ON, S_KEY_OFF,
S_KEY_MAXCOLS, S_KEY_MAXROWS,
- S_KEY_FRONT, S_KEY_NOFRONT
+ S_KEY_FRONT, S_KEY_NOFRONT, S_KEY_OFFSET
};
enum set_colorbox_id {
diff --git a/src/version.c b/src/version.c
index 95a726e..0172267 100644
--- a/src/version.c
+++ b/src/version.c
@@ -35,12 +35,12 @@
#include "syscfg.h" /* for FAQ_LOCATION */
-const char gnuplot_version[] = "5.4";
-const char gnuplot_patchlevel[] = "4";
+const char gnuplot_version[] = "5.4.5";
+const char gnuplot_patchlevel[] = "5";
#ifdef DEVELOPMENT_VERSION
#include "timestamp.h"
#else
-const char gnuplot_date[] = "2022-07-10 ";
+const char gnuplot_date[] = "2022-09-22 ";
#endif
const char gnuplot_copyright[] = "Copyright (C) 1986-1993, 1998, 2004, 2007-2022";
diff --git a/term/hpgl.trm b/term/hpgl.trm
index c6ca388..0408897 100644
--- a/term/hpgl.trm
+++ b/term/hpgl.trm
@@ -634,6 +634,7 @@ static int HPGL_x = UNKNOWN;
static int HPGL_y = UNKNOWN;
static int HPGL_penstate = UNKNOWN;
static int HPGL_pentype;
+static double HPGL_fontscale = 1.0;
/* pen */
static int HPGL2_pentype = LT_UNDEFINED;
@@ -673,11 +674,17 @@ HPGL_options()
{
HPGL_numpen = 6; /* default to six pens */
HPGL_eject = 0; /* default to no eject */
+ HPGL_fontscale = 1.0;
while (!END_OF_COMMAND) {
if (almost_equals(c_token, "eje$ct"))
HPGL_eject = 1;
- else if (isanumber(c_token)) {
+ else if (almost_equals(c_token, "fonts$cale")) {
+ c_token++;
+ HPGL_fontscale = real_expression();
+ if (HPGL_fontscale <= 0)
+ HPGL_fontscale = 1.0;
+ } else if (isanumber(c_token)) {
HPGL_numpen = (int) real(&token[c_token].l_val);
if (HPGL_numpen <= 0) {
HPGL_numpen = 6;
@@ -691,6 +698,8 @@ HPGL_options()
sprintf(term_options, "%d pens %s", HPGL_numpen,
HPGL_eject ? "eject" : "noeject");
+ if (HPGL_fontscale != 1.0)
+ sprintf( &term_options[strlen(term_options)], " fontscale %.2f", HPGL_fontscale);
}
static int PCL_landscape = TRUE;
@@ -1024,14 +1033,18 @@ HPGL_graphics()
*/
fprintf(gpoutfile,
"IN;%s\nSC0,%d,0,%d;\nSR%f,%f;\n",
- ((encoding == S_ENC_CP850) || (encoding == S_ENC_ISO8859_1)) ?
- "CA7;" : "",
- HPGL_XMAX, HPGL_YMAX, ((double) (HPGL_HCHAR) * 200 / 3 / HPGL_XMAX), ((double) (HPGL_VCHAR) * 100 / 2 / HPGL_YMAX));
+ ((encoding == S_ENC_CP850) || (encoding == S_ENC_ISO8859_1)) ? "CA7;" : "",
+ HPGL_XMAX, HPGL_YMAX,
+ HPGL_fontscale * ((HPGL_HCHAR) * 200. / 3. / HPGL_XMAX),
+ HPGL_fontscale * ((HPGL_VCHAR) * 100. / 2. / HPGL_YMAX));
/* 1 2 3
1. reset to power-up defaults
2. set SCaling
3. set character size
*/
+ term->v_char = HPGL_fontscale * HPGL_VCHAR;
+ term->h_char = HPGL_fontscale * HPGL_HCHAR;
+ HPGL_penstate = UP;
HPGL_ang = 0;
}
@@ -3287,29 +3300,26 @@ START_HELP(hpgl)
"?terminal hpgl",
"?term hpgl",
"?hpgl",
-" The `hpgl` driver produces HPGL output for devices like the HP7475A plotter.",
-" There are two options which can be set: the number of pens and `eject`,",
-" which tells the plotter to eject a page when done. The default is to use 6",
-" pens and not to eject the page when done.",
-"",
-" The international character sets ISO-8859-1 and CP850 are recognized via",
-" `set encoding iso_8859_1` or `set encoding cp850` (see `set encoding` for",
-" details).",
-"",
" Syntax:",
-" set terminal hpgl {<number_of_pens>} {eject}",
-"",
-" The selection",
-"",
-" set terminal hpgl 8 eject",
-"",
-" is equivalent to the previous `hp7550` terminal, and the selection",
+" set terminal hpgl {<number_of_pens>} {eject} {fontscale <scale>}",
"",
-" set terminal hpgl 4",
+" The `hpgl` driver produces HPGL output for Hewlett Packard pen plotters",
+" like the HP7475A and many other plotters dating back to the 1970s.",
+" Also, HPGL graphics can be imported by many software packages.",
+" The HPGL command language was largely superseded in later printers by the",
+" PCL command language. See `set term pcl5`.",
"",
-" is equivalent to the previous `hp7580b` terminal."
+" Terminal options control the number of pens used and whether or not the",
+" plotter ejects a page when done. The default is to use 6 pens and",
+" not eject the page.",
"",
-" HPGL graphics can be imported by many software packages."
+" All text is drawn in a uniform size. The `fontscale` option applies",
+" a scale factor to make this size larger or smaller.",
+" If gnuplot's current encoding is set to either iso_8859_1 cp850,",
+" non-ascii characters are translated for handling by some printer models",
+" that support the corresponding character set. If your printer model",
+" does not support this, do not set these encodings.",
+""
END_HELP(hpgl)
START_HELP(pcl5)
diff --git a/term/pdf.trm b/term/pdf.trm
index da5ce31..e87af75 100644
--- a/term/pdf.trm
+++ b/term/pdf.trm
@@ -1278,7 +1278,7 @@ PDF_filled_polygon(int points, gpiPoint* corners)
{
int i;
int fillpar = corners->style >> 4;
- int style = corners->style &= 0xf;
+ int style = corners->style & 0xf;
PDF_PathClose();
PDF_save(myPDF);
diff --git a/term/svg.trm b/term/svg.trm
index 87883ea..df1d668 100644
--- a/term/svg.trm
+++ b/term/svg.trm
@@ -1209,14 +1209,15 @@ SVG_text ()
fprintf(gpoutfile, "gnuplot_svg.plot_timeaxis_y = \"\";\n");
/* Hypertext font properties
- * NB: These will apply to all hypertext in the plot
- * separate font for individual labels would require additional code
+ * NB - These will apply to all hypertext in the plot
+ * separate font for individual labels would require additional code
+ * - We trimmed SVG_hypertext_fontName back to just the Family name
*/
fprintf(gpoutfile, "gnuplot_svg.hypertext_fontSize = %.1g;\n", SVG_hypertext_fontSize);
if (SVG_hypertext_fontName)
- fprintf(gpoutfile, "gnuplot_svg.hypertext_fontName = \"%s\";\n", SVG_hypertext_fontName);
+ fprintf(gpoutfile, "gnuplot_svg.hypertext_fontFamily = \"%s\";\n", SVG_hypertext_fontName);
else
- fprintf(gpoutfile, "gnuplot_svg.hypertext_fontName = null;\n");
+ fprintf(gpoutfile, "gnuplot_svg.hypertext_fontFamily = null;\n");
if (SVG_hypertext_fontStyle)
fprintf(gpoutfile, "gnuplot_svg.hypertext_fontStyle = \"%s\";\n", SVG_hypertext_fontStyle);
else
@@ -1724,7 +1725,7 @@ SVG_filled_polygon(int points, gpiPoint* corners)
{
int i;
int fillpar = corners->style >> 4;
- int style = corners->style &= 0xf;
+ int style = corners->style & 0xf;
if (style == FS_PATTERN || style == FS_TRANSPARENT_PATTERN) {
/* make sure the pattern is defined (with the current stroke color)
@@ -2178,7 +2179,7 @@ SVG_hypertext( int type, const char *text )
if (!text || !(*text))
break;
- sep = strcspn(text, ",: ");
+ sep = strcspn(text, ",:");
if (sep > 0) {
SVG_hypertext_fontName = gp_strdup(text);
SVG_hypertext_fontName[sep] = '\0';
Debdiff
[The following lists of changes regard files as different if they have different names, permissions or owners.]
Files in second set of .debs but not in first
-rw-r--r-- root/root /usr/lib/debug/.build-id/0b/434fdcaad6ef617b57548fe91080e0bbf8be5c.debug -rw-r--r-- root/root /usr/lib/debug/.build-id/54/2de4dd788c5c9428b3b9baf5aded0add2fdacc.debug -rw-r--r-- root/root /usr/lib/debug/.build-id/73/1dddb0a4f8868a8cf0ba5b3e20cbce6ecd1758.debug -rw-r--r-- root/root /usr/lib/debug/.build-id/a6/10ffc11932f74d97112879d0b6404bbc7fadf1.debug -rw-r--r-- root/root /usr/lib/debug/.build-id/a9/c09e2859e77947d9dd142bff803469dad379ea.debug -rw-r--r-- root/root /usr/lib/debug/.build-id/bf/e0671a630713ce5dfb23ba185fd4c3e4817153.debug -rw-r--r-- root/root /usr/share/doc/gnuplot/htmldocs/node651.html
Files in first set of .debs but not in second
-rw-r--r-- root/root /usr/lib/debug/.build-id/41/a9609da25222e757cdcffa93d0e93e5307a718.debug -rw-r--r-- root/root /usr/lib/debug/.build-id/51/b94aaf76701f360674cd9e9e6ae0d282b2f5c7.debug -rw-r--r-- root/root /usr/lib/debug/.build-id/53/eb7519d1382b29c22e7ee9ebec7244e9751fff.debug -rw-r--r-- root/root /usr/lib/debug/.build-id/60/d0f9c4a8f3a69821bab80ba847ce57448485f3.debug -rw-r--r-- root/root /usr/lib/debug/.build-id/8f/b5b21d308428ea10dc9cde000e8ffb9b7472f0.debug -rw-r--r-- root/root /usr/lib/debug/.build-id/dd/acc83c8238e780f16b44ca89af9c179d30e8c9.debug
No differences were encountered between the control files of package gnuplot
No differences were encountered between the control files of package gnuplot-data
No differences were encountered between the control files of package gnuplot-doc
No differences were encountered between the control files of package gnuplot-nox
Control files of package gnuplot-nox-dbgsym: lines which differ (wdiff format)
Build-Ids: 41a9609da25222e757cdcffa93d0e93e5307a718 a9c09e2859e77947d9dd142bff803469dad379ea
Control files of package gnuplot-qt: lines which differ (wdiff format)
Depends: gnuplot-data (= libc6 (>= 2.34), libcairo2 (>= 1.6.0), libedit2 (>= 2.11-20080614-0), libgcc-s1 (>= 3.0), libgd3 (>= 2.1.0~alpha~), libglib2.0-0 (>= 2.12.0), liblua5.4-0 (>= 5.4.4), libpango-1.0-0 (>= 1.22.0), libpangocairo-1.0-0 (>= 1.14.0), libqt5core5a (>= 5.15.1), libqt5gui5 (>= 5.11.0~rc1) | libqt5gui5-gles (>= 5.11.0~rc1), libqt5network5 (>= 5.0.2), libqt5printsupport5 (>= 5.0.2), libqt5svg5 (>= 5.6.0~beta), libqt5widgets5 (>= 5.2.0), libstdc++6 (>= 5.2), libwxbase3.2-1 libwxbase3.2-0 (>= 3.2.1+dfsg), libwxgtk3.2-1 libwxgtk3.2-0 (>= 3.2.1+dfsg-2), 3.2.0+dfsg), libx11-6
Control files of package gnuplot-qt-dbgsym: lines which differ (wdiff format)
Build-Ids: 51b94aaf76701f360674cd9e9e6ae0d282b2f5c7 60d0f9c4a8f3a69821bab80ba847ce57448485f3 ddacc83c8238e780f16b44ca89af9c179d30e8c9 0b434fdcaad6ef617b57548fe91080e0bbf8be5c a610ffc11932f74d97112879d0b6404bbc7fadf1 bfe0671a630713ce5dfb23ba185fd4c3e4817153
Control files of package gnuplot-x11: lines which differ (wdiff format)
Depends: gnuplot-data (= libc6 (>= 2.34), libcairo2 (>= 1.6.0), libedit2 (>= 2.11-20080614-0), libgcc-s1 (>= 3.0), libgd3 (>= 2.1.0~alpha~), libglib2.0-0 (>= 2.12.0), liblua5.4-0 (>= 5.4.4), libpango-1.0-0 (>= 1.22.0), libpangocairo-1.0-0 (>= 1.14.0), libstdc++6 (>= 5.2), libwxbase3.2-1 libwxbase3.2-0 (>= 3.2.1+dfsg), libwxgtk3.2-1 libwxgtk3.2-0 (>= 3.2.1+dfsg-2), 3.2.0+dfsg), libx11-6
Control files of package gnuplot-x11-dbgsym: lines which differ (wdiff format)
Build-Ids: 53eb7519d1382b29c22e7ee9ebec7244e9751fff 8fb5b21d308428ea10dc9cde000e8ffb9b7472f0 542de4dd788c5c9428b3b9baf5aded0add2fdacc 731dddb0a4f8868a8cf0ba5b3e20cbce6ecd1758