diff --git a/configure.ac b/configure.ac index bd4ed2166..62626e64d 100644 --- a/configure.ac +++ b/configure.ac @@ -1084,12 +1084,18 @@ if test "${enable_qt}" = yes ; then UIC=${QT6LOC}/uic MOC=${QT6LOC}/moc RCC=${QT6LOC}/rcc - else + elif test "x${UIC}" = "x"; then UIC=uic-qt6 MOC=moc-qt6 RCC=rcc-qt6 fi - LRELEASE=lrelease-qt6 + QT6BIN=`$PKG_CONFIG --variable=bindir Qt6Core` + if test "x${QT6BIN}" != "x"; then + LRELEASE=${QT6BIN}/lrelease + elif test "x${LRELEASE}" = "x"; then + LRELEASE=lrelease-qt6 + fi + CXXFLAGS="$CXXFLAGS -fPIC" AC_MSG_RESULT([The Qt terminal will use Qt6.]) QTVER="6" diff --git a/demo/all.dem b/demo/all.dem index 274724215..7012d78d7 100644 --- a/demo/all.dem +++ b/demo/all.dem @@ -206,8 +206,12 @@ print "******************** file binary.dem ********************" load "binary.dem" reset -print "******************** file steps.dem ********************" +print "******************** hsteps demos ********************" load "steps.dem" +load "hsteps.dem" +load "hsteps_histogram.dem" +load "rank_sequence.dem" +load "logic_timing.dem" reset print "******************** file scatter.dem ********************" diff --git a/demo/callargs.dem b/demo/callargs.dem index e40839b68..0ac0aceac 100644 --- a/demo/callargs.dem +++ b/demo/callargs.dem @@ -11,7 +11,7 @@ $DATA << EOD 1 2 3 4 EOD -set table +set table $OUT print "\nEntering ", ARG0, " with ", ARGC, " parameters" if (ARGC == 0) { diff --git a/demo/colornames.dem b/demo/colornames.dem index c583d36f5..29d108188 100644 --- a/demo/colornames.dem +++ b/demo/colornames.dem @@ -1,5 +1,6 @@ # # Draw a table of named colors +# Note: These names and values must match those in .../src/tables.c # unset tics unset border @@ -92,7 +93,7 @@ plot 0 lt nodraw notitle,\ keyentry w boxes title "sienna1" lc rgb 0xff8040, \ keyentry w boxes title "sienna4" lc rgb 0x804014, \ keyentry w boxes title "skyblue" lc rgb 0x87ceeb, \ - keyentry w boxes title "slateblue1" lc rgb 0x8060ff, \ + keyentry w boxes title "slateblue" lc rgb 0x8060ff, \ keyentry w boxes title "slategray" lc rgb 0xa0b6cd, \ keyentry w boxes title "spring-green" lc rgb 0x00ff7f, \ keyentry w boxes title "steelblue" lc rgb 0x306080, \ diff --git a/demo/contourfill.dem b/demo/contourfill.dem index c2885fe92..31b851e04 100644 --- a/demo/contourfill.dem +++ b/demo/contourfill.dem @@ -19,6 +19,7 @@ set samples 51 set pm3d border lt -1 lw 0.5 set pm3d depth +sinc(x) = (x==0) ? 1.0 : sin(x) / x f(x,y) = sinc( sqrt(x*x + y*y) ) set label 1 "set palette cubehelix\nmaxcolors 7" @@ -44,11 +45,10 @@ reset # Illustrate work in progress on new plot style "with contourfill" # The style options are # set contourfill -# auto N N evenly spaced slices spanning zrange -# ztics {level L} slice boundary at every ztic with level L -# cbtics {level L} slice boundary at every cbtic with level L +# auto N N evenly spaced slices spanning zrange +# ztics slice boundary at every z axis major tic +# cbtics slice boundary at every cb axis major tic # -# The tics level L defaults to 0 (major tics). # cbtics are still active even if the colorbox isn't shown, # so an arbitrary set of slice boundaries can be constructe via # set cbtics ( z1, z2, z3, z4, ... ) diff --git a/demo/hsteps.dem b/demo/hsteps.dem new file mode 100644 index 000000000..b6b35c933 --- /dev/null +++ b/demo/hsteps.dem @@ -0,0 +1,116 @@ +# +# 2D plot style "with hsteps" +# 1) variations of connecting line shape +# + +$data < to continue" + + +# +# 2D plot style "with hsteps" +# 1) variations of connecting line shape +# +unset key +set xrange [0:7] + +set multiplot layout 3,3 columnsfirst offset 0,0 scale 1.1,1.1 + + set title "full width" + plot $data using 1:2 ls 1 with hsteps, \ + $data using 1:2 with points pt 7 ps 1 lc black + + set title "width 0.8" + plot $data using 1:2:(0.8) ls 1 with hsteps, \ + $data using 1:2 with points pt 7 ps 1 lc black + + set title "width 0.4" + plot $data using 1:2:(0.4) ls 1 with hsteps, \ + $data using 1:2 with points pt 7 ps 1 lc black + + set title "forward" + plot $data using 1:2 ls 1 with hsteps forward, \ + $data using 1:2 with points pt 7 ps 1 lc black + + set title "forward" + plot $data using 1:2:(0.8) ls 1 with hsteps forward, \ + $data using 1:2 with points pt 7 ps 1 lc black + + set title "forward" + plot $data using 1:2:(0.4) ls 1 with hsteps forward, \ + $data using 1:2 with points pt 7 ps 1 lc black + + set title "backward" + plot $data using 1:2 ls 1 with hsteps backward, \ + $data using 1:2 with points pt 7 ps 1 lc black + + set title "backward" + plot $data using 1:2:(0.8) ls 1 with hsteps backward, \ + $data using 1:2 with points pt 7 ps 1 lc black + + set title "backward" + plot $data using 1:2:(0.4) ls 1 with hsteps backward, \ + $data using 1:2 with points pt 7 ps 1 lc black + +unset multiplot + +pause -1 " to continue" + +set yrange [-1:13] +set title "hsteps with variable fill color" +set style fill solid 0.5 border lc "black" +plot $data using 1:2:(0.7):1 with hsteps fc variable + +pause -1 " to continue" +reset diff --git a/demo/hsteps_histogram.dem b/demo/hsteps_histogram.dem new file mode 100644 index 000000000..0f62b8713 --- /dev/null +++ b/demo/hsteps_histogram.dem @@ -0,0 +1,35 @@ +# +# Two plot style options "with hsteps link" and "with hsteps pillar" +# can be combined to create a stacked histogram with connecting lines +# between category boundaries. +# + +set title "Stacked histogram constructed from plot style hsteps" + +$data < to continue" +reset diff --git a/demo/html/Makefile b/demo/html/Makefile index 81c53120a..844c04f30 100644 --- a/demo/html/Makefile +++ b/demo/html/Makefile @@ -12,7 +12,7 @@ GNUPLOT_LIB = .. # Several of the demos need manual intervention: # fontfile vector epslatex # -html: airfoil.html animation.html approximate.html armillary.html array.html arrowstyle.html barchart_art.html binary.html bins.html bivariat.html boxplot.html boxclusters.html candlesticks.html chi_shapes.html circles.html cities.html columnhead.html contours.html convex_hull.html custom_contours.html controls.html custom_key.html dashtypes.html datastrings.html dgrid3d.html discrete.html electron.html ellipse.html enhanced_utf8.html epslatex.html errorbars.html fenceplot.html fillbetween.html fillcrvs.html fillstyle.html finance.html fit.html function_block.html hidden.html hidden2.html hidden_compare.html histograms.html histograms2.html histerror.html histogram_colors.html gantt.html image.html image2.html imageNaN.html index.html iris.html iterate.html jitter.html keyentry.html label_stacked_histograms.html layout.html lines_arrows.html linkedaxes.html map_projection.html margins.html mask_pm3d.html monotonic_spline.html multiaxis.html multiplt.html named_palettes.html nokey.html nonlinear1.html nonlinear2.html nonlinear3.html parallel.html param.html piecewise.html pixmap.html pm3dcolors.html pm3d.html pm3dgamma.html pm3d_clip.html pm3d_lighting.html pointsize.html polar.html polargrid.html poldat.html polar_quadrants.html polygons.html prob2.html prob.html projection.html rainbow.html random.html rectangle.html rgba_lines.html argb_hexdata.html rgb_variable.html rotate_labels.html rugplot.html running_avg.html sampling.html scatter.html simple.html singulr.html sectors.html sharpen.html spotlight.html smooth.html smooth_path.html solar_path.html spiderplot.html spline.html smooth_splines.html steps.html stringvar.html surface1.html surface2.html azimuth.html transparent.html transparent_solids.html textbox.html tics.html timedat.html ttics.html using.html varcolor.html vector.html violinplot.html walls.html world.html heatmaps.html heatmap_4D.html heatmap_points.html stats.html unicode.html viridis.html windrose.html zerror.html boxes3d.html voxel.html vplot.html isosurface.html +html: airfoil.html animation.html approximate.html armillary.html array.html arrowstyle.html barchart_art.html binary.html bins.html bivariat.html boxplot.html boxclusters.html candlesticks.html chi_shapes.html circles.html cities.html columnhead.html contourfill.html contours.html convex_hull.html custom_contours.html controls.html custom_key.html dashtypes.html datastrings.html dgrid3d.html discrete.html electron.html ellipse.html enhanced_utf8.html epslatex.html errorbars.html fenceplot.html fillbetween.html fillcrvs.html fillstyle.html finance.html fit.html function_block.html hidden.html hidden2.html hidden_compare.html histograms.html histograms2.html histerror.html histogram_colors.html hsteps.html histeps_histogram.html gantt.html image.html image2.html imageNaN.html index.html iris.html iterate.html jitter.html keyentry.html label_stacked_histograms.html layout.html lines_arrows.html linkedaxes.html logic_timing.html map_projection.html margins.html mask_pm3d.html monotonic_spline.html multiaxis.html multiplt.html named_palettes.html nokey.html nonlinear1.html nonlinear2.html nonlinear3.html parallel.html param.html piecewise.html pixmap.html pm3dcolors.html pm3d.html pm3dgamma.html pm3d_clip.html pm3d_lighting.html pointsize.html polar.html polargrid.html poldat.html polar_quadrants.html polygons.html prob2.html prob.html projection.html rainbow.html random.html rank_sequence.html rectangle.html rgba_lines.html argb_hexdata.html rgb_variable.html rotate_labels.html rugplot.html running_avg.html sampling.html scatter.html simple.html singulr.html sectors.html sharpen.html spotlight.html smooth.html smooth_path.html solar_path.html spiderplot.html spline.html smooth_splines.html steps.html stringvar.html surface1.html surface2.html azimuth.html transparent.html transparent_solids.html textbox.html tics.html timedat.html ttics.html using.html varcolor.html vector.html violinplot.html walls.html world.html heatmaps.html heatmap_4D.html heatmap_points.html stats.html unicode.html viridis.html windrose.html zerror.html boxes3d.html voxel.html vplot.html isosurface.html index.html: index.save cp index.save index.html diff --git a/demo/html/Makefile.canvas b/demo/html/Makefile.canvas index c8ca97b4a..1124e214b 100644 --- a/demo/html/Makefile.canvas +++ b/demo/html/Makefile.canvas @@ -9,9 +9,9 @@ GNUPLOT_LIB = .. # # Auto-generation of html demo set. # -html_3d: binary.html bivariat.html contours.html custom_contours.html datastrings.html discrete.html errorbars.html fenceplot.html hidden.html hidden2.html hidden_compare.html margins.html pixmap.html pm3dcolors.html pm3d.html pm3d_clip.html pm3d_lighting.html pointsize.html polygons.html random.html rgb_variable.html sampling.html scatter.html singulr.html surface1.html surface2.html azimuth.html projection.html transparent_solids.html vector.html walls.html world.html zerror.html boxes3d.html vplot.html voxel.html isosurface.html +html_3d: binary.html bivariat.html contourfill.html contours.html custom_contours.html datastrings.html discrete.html errorbars.html fenceplot.html hidden.html hidden2.html hidden_compare.html margins.html pixmap.html pm3dcolors.html pm3d.html pm3d_clip.html pm3d_lighting.html pointsize.html polygons.html random.html rgb_variable.html sampling.html scatter.html singulr.html surface1.html surface2.html azimuth.html projection.html transparent_solids.html vector.html walls.html world.html zerror.html boxes3d.html vplot.html voxel.html isosurface.html -html_2d: airfoil.html approximate.html array.html barchart_art.html bins.html boxplot.html boxclusters.html candlesticks.html canvas_utf8.html chi_shapes.html circles.html cities.html columnhead.html controls.html convex_hull.html custom_key.html dashtypes.html electron.html enhanced_utf8.html fillbetween.html fillcrvs.html fillstyle.html finance.html histograms.html histograms2.html histerror.html histogram_colors.html hypertext.html hypertext_surface.html gantt.html imageNaN.html index.html iris.html iterate.html jitter.html keyentry.html label_stacked_histograms.html layout.html lines_arrows.html linkedaxes.html map_projection.html mask_pm3d.html monotonic_spline.html multiaxis.html multiplt.html nonlinear1.html nonlinear2.html nonlinear3.html named_palettes.html nokey.html param.html piecewise.html polar.html polargrid.html poldat.html polar_quadrants.html prob2.html prob.html rainbow.html ellipse.html rectangle.html rgba_lines.html argb_hexdata.html rotate_labels.html rugplot.html running_avg.html simple.html sectors.html sharpen.html smooth.html smooth_path.html solar_path.html smooth_splines.html spiderplot.html spline.html steps.html transparent.html timedat.html ttics.html using.html varcolor.html world.html heatmaps.html heatmap_4D.html heatmap_points.html stats.html violinplot.html windrose.html +html_2d: airfoil.html approximate.html array.html barchart_art.html bins.html boxplot.html boxclusters.html candlesticks.html canvas_utf8.html chi_shapes.html circles.html cities.html columnhead.html controls.html convex_hull.html custom_key.html dashtypes.html electron.html enhanced_utf8.html fillbetween.html fillcrvs.html fillstyle.html finance.html histograms.html histograms2.html histerror.html histogram_colors.html hsteps.html hsteps_histogram.html hypertext.html hypertext_surface.html gantt.html imageNaN.html index.html iris.html iterate.html jitter.html keyentry.html label_stacked_histograms.html layout.html lines_arrows.html linkedaxes.html logic_timing.html map_projection.html mask_pm3d.html monotonic_spline.html multiaxis.html multiplt.html nonlinear1.html nonlinear2.html nonlinear3.html named_palettes.html nokey.html param.html piecewise.html polar.html polargrid.html poldat.html polar_quadrants.html prob2.html prob.html rainbow.html ellipse.html rank_sequence.html rectangle.html rgba_lines.html argb_hexdata.html rotate_labels.html rugplot.html running_avg.html simple.html sectors.html sharpen.html smooth.html smooth_path.html solar_path.html smooth_splines.html spiderplot.html spline.html steps.html transparent.html timedat.html ttics.html using.html varcolor.html world.html heatmaps.html heatmap_4D.html heatmap_points.html stats.html violinplot.html windrose.html html: html_2d html_3d diff --git a/demo/html/Makefile.svg b/demo/html/Makefile.svg index 062304812..aef8abd8e 100644 --- a/demo/html/Makefile.svg +++ b/demo/html/Makefile.svg @@ -9,7 +9,7 @@ GNUPLOT_LIB = .. # # Auto-generation of the svg demo set. # -html: airfoil.html approximate.html armillary.html array.html barchart_art.html binary.html bins.html bivariat.html boxplot.html boxclusters.html candlesticks.html cerf.html chi_shapes.html circles.html cities.html columnhead.html contours.html custom_contours.html controls.html convex_hull.html custom_key.html dashtypes.html datastrings.html discrete.html electron.html enhanced_utf8.html errorbars.html fenceplot.html fillbetween.html fillcrvs.html fillstyle.html finance.html hidden.html hidden2.html hidden_compare.html histograms.html histograms2.html histerror.html histogram_colors.html hypertext.html hypertext_surface.html gantt.html imageNaN.html index.html iris.html iterate.html jitter.html keyentry.html label_stacked_histograms.html layout.html lines_arrows.html linkedaxes.html map_projection.html margins.html mask_pm3d.html monotonic_spline.html multiaxis.html multiplt.html nonlinear1.html nonlinear2.html nonlinear3.html named_palettes.html nokey.html parallel.html param.html piecewise.html pixmap.html pm3dcolors.html pm3d.html pm3d_clip.html pm3d_lighting.html pointsize.html polar.html polargrid.html poldat.html polar_quadrants.html polygons.html prob2.html prob.html rainbow.html random.html rectangle.html rgba_lines.html argb_hexdata.html rgb_variable.html rotate_labels.html rugplot.html running_avg.html sampling.html scatter.html simple.html singulr.html sectors.html sharpen.html smooth.html smooth_path.html smooth_splines.html spiderplot.html spline.html solar_path.html steps.html stringvar.html surface1.html surface2.html azimuth.html projection.html textbox.html transparent.html transparent_solids.html tics.html timedat.html ttics.html using.html varcolor.html vector.html violinplot.html walls.html world.html heatmaps.html heatmap_4D.html heatmap_points.html ellipse.html stats.html unicode.html windrose.html zerror.html boxes3d.html +html: airfoil.html approximate.html armillary.html array.html barchart_art.html binary.html bins.html bivariat.html boxplot.html boxclusters.html candlesticks.html cerf.html chi_shapes.html circles.html cities.html columnhead.html contourfill.html contours.html custom_contours.html controls.html convex_hull.html custom_key.html dashtypes.html datastrings.html discrete.html electron.html enhanced_utf8.html errorbars.html fenceplot.html fillbetween.html fillcrvs.html fillstyle.html finance.html hidden.html hidden2.html hidden_compare.html histograms.html histograms2.html histerror.html histogram_colors.html hsteps.html hsteps_histogram.html hypertext.html hypertext_surface.html gantt.html imageNaN.html index.html iris.html iterate.html jitter.html keyentry.html label_stacked_histograms.html layout.html lines_arrows.html linkedaxes.html logic_timing.html map_projection.html margins.html mask_pm3d.html monotonic_spline.html multiaxis.html multiplt.html nonlinear1.html nonlinear2.html nonlinear3.html named_palettes.html nokey.html parallel.html param.html piecewise.html pixmap.html pm3dcolors.html pm3d.html pm3d_clip.html pm3d_lighting.html pointsize.html polar.html polargrid.html poldat.html polar_quadrants.html polygons.html prob2.html prob.html rainbow.html random.html rank_sequence.html rectangle.html rgba_lines.html argb_hexdata.html rgb_variable.html rotate_labels.html rugplot.html running_avg.html sampling.html scatter.html simple.html singulr.html sectors.html sharpen.html smooth.html smooth_path.html smooth_splines.html spiderplot.html spline.html solar_path.html steps.html stringvar.html surface1.html surface2.html azimuth.html projection.html textbox.html transparent.html transparent_solids.html tics.html timedat.html ttics.html using.html varcolor.html vector.html violinplot.html walls.html world.html heatmaps.html heatmap_4D.html heatmap_points.html ellipse.html stats.html unicode.html windrose.html zerror.html boxes3d.html index.html: index.svg cp index.svg index.html diff --git a/demo/html/index.6new b/demo/html/index.6new index ed1d007ff..7075d5743 100644 --- a/demo/html/index.6new +++ b/demo/html/index.6new @@ -1,5 +1,6 @@ Demos for gnuplot version 6.1 + @@ -21,7 +22,8 @@
  • fill between curves
  • candlesticks
  • error bars
  • -
  • step functions
  • +
  • simple step functions
  • +
  • *hsteps
  • multiple axis scales
  • mixing styles
  • variable size points
  • @@ -87,6 +89,7 @@
  • surfaces 2
  • contours
  • custom contour lines
  • +
  • *filled contours
  • singularities
  • hidden surfaces
  • pm3d coloring
  • @@ -166,6 +169,7 @@
  • histogram + errorbars
  • make-your-own with boxes
  • automatic binning
  • +
  • Ù­linked stacks
  • Sample Applications

    @@ -188,6 +192,8 @@
  • violin plot
  • Ù­wind rose
  • Ù­overlapping categories
  • +
  • Ù­logic timing diagram
  • +
  • Ù­sequential ranking
  • Text options

    @@ -285,7 +291,7 @@ - This page generated March 2023 + This page generated August 2023 diff --git a/demo/html/index.canvas b/demo/html/index.canvas index 1081319d0..0b48eac23 100644 --- a/demo/html/index.canvas +++ b/demo/html/index.canvas @@ -29,7 +29,8 @@
  • fill between curves
  • candlesticks
  • error bars
  • -
  • step functions
  • +
  • simple step functions
  • +
  • hsteps
  • multiple axis scales
  • mixing styles
  • variable size points
  • @@ -93,6 +94,7 @@
  • surfaces 2
  • contours
  • custom contour lines
  • +
  • filled contours
  • singularities
  • hidden surfaces
  • pm3d coloring
  • @@ -161,6 +163,7 @@
  • histogram + errorbars
  • make-your-own with boxes
  • automatic binning
  • +
  • linked stacks
  • Sample Applications

    @@ -182,6 +185,8 @@
  • violin plot
  • wind rose
  • overlapping categories
  • +
  • logic timing diagram
  • +
  • sequential ranking
  • Text options

    @@ -269,7 +274,7 @@ - This page generated March 2023 + This page generated August 2023 diff --git a/demo/html/index.save b/demo/html/index.save index f3b6efc46..6885dca5e 100644 --- a/demo/html/index.save +++ b/demo/html/index.save @@ -1,6 +1,8 @@ Demos for gnuplot version 6.1 - + + +

    Demos for gnuplot version 6.1 (pngcairo terminal)
    @@ -24,7 +26,8 @@ Here are samples of PNG output from some of the demos.
  • fill between curves
  • candlesticks
  • error bars
  • -
  • step functions
  • +
  • simple step functions
  • +
  • hsteps
  • multiple axis scales
  • mixing styles
  • variable size points
  • @@ -94,6 +97,7 @@ Here are samples of PNG output from some of the demos.
  • surfaces 2
  • contours
  • custom contour lines
  • +
  • filled contours
  • singularities
  • hidden surfaces
  • pm3d coloring
  • @@ -167,6 +171,7 @@ Here are samples of PNG output from some of the demos.
  • histogram + errorbars
  • make-your-own with boxes
  • automatic binning
  • +
  • linked stacks
  • Sample Applications

    @@ -188,6 +193,8 @@ Here are samples of PNG output from some of the demos.
  • violin plot
  • wind rose
  • overlapping categories
  • +
  • logic timing diagram
  • +
  • sequential ranking
  • Text options

    @@ -243,7 +250,7 @@ Here are samples of PNG output from some of the demos. - This page generated March 2023 + This page generated August 2023 diff --git a/demo/html/index.special_functions b/demo/html/index.special_functions index 5b51643a5..1bc565f24 100644 --- a/demo/html/index.special_functions +++ b/demo/html/index.special_functions @@ -1,5 +1,6 @@ Demos for gnuplot version 6.1 + @@ -20,7 +21,8 @@
  • fill between curves
  • candlesticks
  • error bars
  • -
  • step functions
  • +
  • simple step functions
  • +
  • hsteps
  • multiple axis scales
  • mixing styles
  • variable size points
  • @@ -86,6 +88,7 @@
  • surfaces 2
  • contours
  • custom contour lines
  • +
  • filled contours
  • singularities
  • hidden surfaces
  • pm3d coloring
  • @@ -164,6 +167,7 @@
  • histogram + errorbars
  • make-your-own with boxes
  • automatic binning
  • +
  • linked stacks
  • Sample Applications

    @@ -186,6 +190,8 @@
  • violin plot
  • wind rose
  • overlapping categories
  • +
  • logic timing diagram
  • +
  • sequential ranking
  • Text options

    @@ -283,7 +289,7 @@ - This page generated March 2023 + This page generated August 2023 diff --git a/demo/html/index.svg b/demo/html/index.svg index 013845eea..5b311916a 100644 --- a/demo/html/index.svg +++ b/demo/html/index.svg @@ -33,7 +33,8 @@ on mouse-coordinate tracking.
  • fill between curves
  • candlesticks
  • error bars
  • -
  • step functions
  • +
  • simple step functions
  • +
  • hsteps
  • multiple axis scales
  • mixing styles
  • variable size points
  • @@ -98,6 +99,7 @@ on mouse-coordinate tracking.
  • surfaces 2
  • contours
  • custom contour lines
  • +
  • filled contours
  • singularities
  • hidden surfaces
  • pm3d coloring
  • @@ -168,6 +170,7 @@ on mouse-coordinate tracking.
  • histogram + errorbars
  • make-your-own with boxes
  • automatic binning
  • +
  • linked stacks
  • Sample Applications

    @@ -189,6 +192,8 @@ on mouse-coordinate tracking.
  • violin plot
  • wind rose
  • overlapping categories
  • +
  • logic timing diagram
  • +
  • sequential ranking
  • Text options

    @@ -251,7 +256,7 @@ on mouse-coordinate tracking. - This page generated March 2023 + This page generated August 2023 diff --git a/demo/logic_timing.dem b/demo/logic_timing.dem new file mode 100644 index 000000000..f474cbbf9 --- /dev/null +++ b/demo/logic_timing.dem @@ -0,0 +1,28 @@ +# +# Logic timing diagram constructed with hsteps +# +set title "Logic timing of bits in sequential ASCII characters" +set title font ":Bold" +set tmargin 4 + +set yrange [0:9] +set xrange [0.5:8] +unset border +unset tics +set ytics 1,1,8 scale 0 format "bit %.0g" offset 0,0.3 +unset key + +set style fill solid 0.2 border lc "black" + +array DATA = [ 0x67, 0x6e, 0x75, 0x70, 0x6c, 0x6f, 0x74 ] +bit(i) = (DATA[column(1)] >> (i-1)) & 0x1 +char(i) = sprintf( "%c", DATA[i] ) + +plot for [k=1:8] \ + DATA using 1:(0.8 * bit(k)):(0.5) with hsteps offset k lw 2 fc black, \ + for [k=1:8] \ + DATA using 1:(k):(bit(k)?"1":"0") with labels offset 0,1 font ",9", \ + DATA using 1:(0.5):(char($1)) with labels font ",16" tc 'blue' + +pause -1 " to continue" +reset diff --git a/demo/rank_sequence.dem b/demo/rank_sequence.dem new file mode 100644 index 000000000..e3ade1487 --- /dev/null +++ b/demo/rank_sequence.dem @@ -0,0 +1,32 @@ +# +# Ranking by week +# +set title "Change in rank over time" +set title font ":Bold" offset 0,1 + +$data < to continue" +reset diff --git a/docs/Makefile.am b/docs/Makefile.am index 233fe4f1b..e94e5f454 100644 --- a/docs/Makefile.am +++ b/docs/Makefile.am @@ -110,7 +110,7 @@ gnuplot-ja.log gnuplot-ja.idx gnuplot-ja.out gnuplot-ja.tex \ wxhelp_figures wxhelp/*.html wxhelp/wgnuplot.hhc wxhelp/wgnuplot.hhk \ wxhelp/wgnuplot.htc wxhelp/doc2html$(EXEEXT) windows/wgnuplot.htk \ svg_figures html/*.html html/*.svg html/*.hhc html/*.hhk \ -webp_figures html/*.webp \ +webp_figures html/*.webp html/figure_mask.png \ windows/*.png gnuplot.htb gnuplot.texi gnuplot-eldoc.el $(ELCS) DISTFILES = $(DIST_COMMON) $(SOURCES) $(DOCHEADERS) $(EXTRA_DIST) diff --git a/docs/doc2web.c b/docs/doc2web.c index 895a39e5d..2aba9ecde 100644 --- a/docs/doc2web.c +++ b/docs/doc2web.c @@ -317,6 +317,9 @@ process_line(char *line, FILE *b, FILE *d) case '?': /* interactive help entry */ if ((line2[1] != NUL) && (line2[1] != ' ') && (line2[1] != '?')) { #ifdef CREATE_INDEX + /* The "term{inal}" index entries don't work because we move that section */ + if (!strcmp(&(line2[1]),"term") || !strcmp(&(line2[1]),"terminal")) + break; /* Only keep single-word entries */ if (!strchr( &(line2[1]), ' ' )) { fprintf(d, "
  • ", location); diff --git a/docs/gnuplot-ja.doc b/docs/gnuplot-ja.doc index e8133f21e..92cd45bc5 100644 --- a/docs/gnuplot-ja.doc +++ b/docs/gnuplot-ja.doc @@ -1,5 +1,5 @@ -C RCS $Id: gnuplot-ja.doc,v 1.791 2023-05-26 15:16:33+09 shige Exp $ -C corresponding original gnuplot.doc at 2023-05-26 +C RCS $Id: gnuplot-ja.doc,v 1.795 2023-08-29 12:50:16+09 shige Exp $ +C corresponding original gnuplot.doc at 2023-08-28 C C Copyright (C) 1986 - 1993, 1998, 1999, 2000, 2001, 2004 Thomas Williams, Colin Kelley et al. C @@ -360,7 +360,7 @@ C #b ¤³¤ì¤Ï¸·Ì©¤Ë¤Ï¿·¤·¤¤ÉÁ²è¥¹¥¿¥¤¥ë¤Ç¤Ï¤¢¤ê¤Þ¤»¤ó¤¬¡¢¥Õ¥£¥ë¥¿ concave ## hull ¤ÈÎΰèÅɤêÄÙ¤·¤Î¥Ñ¥¹¤Ë±è¤Ã¤¿Ê¿³ê²½¤òÁȤ߹ç¤ï¤»¤ë¤³¤È¤Ç¡¢¡ÖËĤé ## ¤ó¤ÀÎΰè¡×¥°¥é¥Õ¤ÎºîÀ®¤¬²Äǽ¤Ë¤Ê¤ê¤Þ¤¹¡£¤³¤ì¤ÏÎ㤨¤ÐÊ£¿ô¤Î¥Ç¡¼¥¿¤Î¤« -## ¤¿¤Þ¤ê¤¬½Å¤Ê¤Ã¤Æ¤¤¤ë¤â¤Î¤Î¹­¤µ¤ò¼¨¤·¤Þ¤¹¡£ +## ¤¿¤Þ¤ê¤¬½Å¤Ê¤Ã¤Æ¤¤¤ë¤â¤Î¤Î¹­¤µ¤ò¼¨¤·¤Þ¤¹¡£°Ê²¼»²¾È: `concavehull`¡£ #b 3 ¼¡¸µÉÁ²è¥¹¥¿¥¤¥ë `with pm3d` ¤Ç¥ª¥×¥·¥ç¥ó½¤¾þ»Ò `zclip [zmin:zmax]` ## ¤¬»È¤¨¤Æ¡¢¤³¤ì¤Ï¶ÊÌÌÁ´ÂΤΤҤȤĤÎÃÇÌ̤ΤߤòÁªÂò¤·¤Þ¤¹¡£¥¯¥ê¥Ã¥Ô¥ó¥° ## ¤Î¶­³¦ÃͤòÁý²Ã¤µ¤»¤ÆϢ³ÉÁ²è¤ò¹Ô¤¦¤³¤È¤Ç¡¢3 ¼¡¸µ¤Ç¤ÏÃÇÌÌÀÚ¤ê½Ð¤·¥¢¥Ë @@ -491,11 +491,11 @@ D viridis 1 ## ¥à¤«¡¢¥¢¥Ë¥á¡¼¥·¥ç¥óÎó¤òÀ¸À®¤·¤Þ¤¹¡£³Æ¥Õ¥ì¡¼¥à¤Ï pngcairo ¤ÇÀ¸À®¤·¡¢ ## ¤½¤Î¸å libwebp ¤È libwebpmux ¤Ë¤è¤ë WebPAnimEncoder API ¤òÄ̤·¤Æ¥¨¥ó ## ¥³¡¼¥É¤ò¹Ô¤¤¤Þ¤¹¡£ -#b `dumb`, `sixel`, `block`, `domterm` ½ÐÎÏ·Á¼°¤Î¤è¤¦¤Ë¡¢Ê¸»úÎó½ÐÎϤȥ° -## ¥é¥Õ¥£¥Ã¥¯É½¼¨¤òƱ¤¸¥¦¥£¥ó¥É¥¦¤Ç¹Ô¤¦¤¤¤¯¤Ä¤«¤Î½ÐÎÏ·Á¼°¤Ç¤Ï¡¢¸½ºß¤Ï¥³ -## ¥Þ¥ó¥É `pause mouse` ¤Î´Ö¤Ï¥­¡¼¥Ü¡¼¥ÉÆþÎϤËÈ¿±þ¤·¤Þ¤¹¡£¤½¤Î´Ö¡¢¤½¤ì -## ¤é¤Î½ÐÎÏ·Á¼°¤Ç¤Ï¡¢¥Þ¥¦¥¹Áàºî¤¬²Äǽ¤Ê½ÐÎÏ·Á¼°¤¬¹Ô¤¦¤Î¤ÈƱ¤¸ÊýË¡¤Ç¥­¡¼ -## ÆþÎϤò²ò¼á¤·¤Þ¤¹¡£ +#b `dumb`, `sixel`, `kitty`, `block`, ½ÐÎÏ·Á¼°¤Î¤è¤¦¤Ë¡¢Ê¸»úÎó½ÐÎϤȥ° +## ¥é¥Õ¥£¥Ã¥¯É½¼¨¤òƱ¤¸¥¦¥£¥ó¥É¥¦¤Ç¹Ô¤¦½ÐÎÏ·Á¼°¤Ç¤Ï¡¢¸½ºß¤Ï¥³¥Þ¥ó¥É +## `pause mouse` ¤Î´Ö¤Ï¥­¡¼¥Ü¡¼¥ÉÆþÎϤËÈ¿±þ¤·¤Þ¤¹¡£¤½¤Î´Ö¡¢¤½¤ì¤é¤Î½ÐÎÏ +## ·Á¼°¤Ç¤Ï¡¢¥Þ¥¦¥¹Áàºî¤¬²Äǽ¤Ê½ÐÎÏ·Á¼°¤¬¹Ô¤¦¤Î¤ÈƱ¤¸ÊýË¡¤Ç¥­¡¼ÆþÎϤò²ò +## ¼á¤·¤Þ¤¹¡£°Ê²¼»²¾È: `pseudo-mousing`¡£ ## Î㤨¤Ð¡¢º¸/±¦/¾å/²¼Ìð°õ¥­¡¼¤Ï¡¢3 ¼¡¸µ¥°¥é¥Õ¤Ç¤Ï»ëÊý¸þ¤òÊѤ¨¡¢2 ¼¡¸µ ## ¥°¥é¥Õ¤Ç¤Ï»ëÅÀ°ÜÆ°/³ÈÂç¤ÎÁýʬ¥¹¥Æ¥Ã¥×¤ò¼Â¹Ô¤·¤Þ¤¹¡£ #end @@ -544,7 +544,8 @@ D epi_data 1 ## ¤·¤Þ¤¹¡£Î㤨¤Ð¡¢"plot FOO using 0:(column($# - 1))" ¤Ï¡¢³Æ¹Ô¤ÎºÇ¸å¤« ## ¤é°ì¤Ä¼êÁ°¤ÎÎó¤òÉÁ²è¤·¤Þ¤¹¡£ #b bin (È¢) Íѥǡ¼¥¿¤ÎϤǤʤ¯Ê¿¶Ñ¤òÉÁ²è¤¹¤ë¥­¡¼¥ï¡¼¥É `binvalue=avg` -#b `set colorbox bottom` ¤Ï¡¢¥«¥é¡¼¥Ü¥Ã¥¯¥¹¤ò¥°¥é¥Õ¤Î²¼¤ËÇÛÃÖ¤·¤Þ¤¹¡£ +#b `set colorbox bottom` ¤Ï¡¢¿âľ¤Ê¥«¥é¡¼¥Ü¥Ã¥¯¥¹¤ò¥°¥é¥Õ¤Î±¦¤ËÇÛÃÖ¤¹¤ë +## Âå¤ï¤ê¤Ë¡¢¿åÊ¿¤Ê¥«¥é¡¼¥Ü¥Ã¥¯¥¹¤ò¥°¥é¥Õ¤Î²¼¤ËÇÛÃÖ¤·¤Þ¤¹¡£ #b cbtics °Ê³°¤Î¼´¤Ë¤Ï±Æ¶Á¤·¤Ê¤¤ `set colorbox cbtics ` #b ¸òº¹¤¹¤ë pm3d ¶ÊÌ̤Υì¥ó¥À¥ê¥ó¥°¤Î²þÎÉ - ½Å¤Ê¤ë¶ÊÌ̤Υ¿¥¤¥ë¤ò¡¢¸òº¹ ## ¶ÊÀþ¤Ë±è¤Ã¤Æ 2 ¤Ä¤ÎÉôʬ¤Ëʬ³ä¤·¡¢°ìÊý¤Î¶ÊÌ̤Υ¿¥¤¥ë¤¬Â¾Êý¤Î¶ÊÌ̤òÄÌ @@ -555,7 +556,7 @@ D epi_data 1 #b `set pm3d border retrace` ¤Ï¡¢³Æ pm3d »ÍÊÕ·Á¤Î¼þ¤ê¤Ë¡¢ÅɤêÄÙ¤·Îΰè¤È ## Ʊ¤¸¿§¤Ç¶­³¦¤òÉÁ¤­¤Þ¤¹¡£¤³¤ì¤Ï¡¢¸¶ÍýŪ¤Ë»ë³Ð¸ú²Ì¤Ï¤¢¤ê¤Þ¤»¤ó¤¬¡¢¤¢¤Þ ## ¤ê¤è¤¯¤Ê¤¤ pdf ¤ä postscript ¥Ó¥å¡¼¥ï¤Î¤è¤¦¤Ê¥Ç¥£¥¹¥×¥ì¥¤¥â¡¼¥É¤Ç¡¢ -## ¥¢¥ó¥Á¥¨¥¤¥ê¥¢¥¹¤Ë¤è¤ëÉû»ºÊª¤¬Æ³Æþ¤µ¤ì¤Ê¤¤¤è¤¦¤Ë¤·¤Þ¤¹¡£ +## ¥¨¥¤¥ê¥¢¥¹¤Ë¤è¤ëÉû»ºÊª¤¬Æ³Æþ¤µ¤ì¤Ê¤¤¤è¤¦¤Ë¤·¤Þ¤¹¡£ #b `set isotropic` ¤Ï¡¢2 ¼¡¸µ¥°¥é¥Õ¤È 3 ¼¡¸µ¥°¥é¥Õ¤ÎξÊý¤Ç¡¢x, y, z ¼´ ## ¤Î¤¹¤Ù¤Æ¤Î¥¹¥±¡¼¥ë¤¬Æ±¤¸¤Ë¤Ê¤ë¤è¤¦¤Ë¥¹¥±¡¼¥ë¤ò¹ç¤ï¤»¤Þ¤¹¡£ #b Êѹ¹: ʸ»ú¤Î²óž³Ñ¤¬À°¿ô¤È¤¤¤¦À©¸Â¤Ï¤Ê¤¯¤Ê¤ê¤Þ¤·¤¿¡£ @@ -582,8 +583,9 @@ D epi_data 1 ## ¤·¤Æ¤½¤Î¾¥Ü¥¯¥»¥ë³Ê»Ò¥Ç¡¼¥¿¤Îɽ¸½ #b ¥Ç¡¼¥¿Á°½èÍý¥Õ¥£¥ë¥¿ `zsort` #b ¥«¥¹¥¿¥Þ¥¤¥º¤·¤¿ËÞÎã (key) ¤òºîÀ®¤¹¤ë `keyentry` -#b ¤â¤Ï¤ä¥Ç¥Õ¥©¥ë¥È¤Ç¤Ï¥Ó¥ë¥É¤·¤Ê¤¤¸Å¤¤ LaTeX ·Ï½ÐÎÏ·Á¼° `latex`, -## `emtex`, `eepic`, `tpic` ¤ÎÂå¤ï¤ê¤Î½ÐÎÏ·Á¼° pict2e +#b ¿·¤·¤¤ LaTeX ·Ï½ÐÎÏ·Á¼° pict2e ¤Ï¡¢¸Å¤¤½ÐÎÏ·Á¼° `latex`, `emtex`, +## `eepic`, `tpic` ¤ÎÂå¤ï¤ê¤Ç¤¹¡£¸Å¤¤½ÐÎÏ·Á¼°¤Ï¤â¤Ï¤ä¥Ç¥Õ¥©¥ë¥È¤Ç¤Ï¥Ó¥ë +## ¥É¤·¤Þ¤»¤ó¡£ #b `set pixmap` ¤Ï¡¢png/jpeg/gif ²èÁü¤ò¥Ô¥¯¥¹¥Þ¥Ã¥×²èÁü¤È¤·¤Æ¼è¤ê¹þ¤ß¡¢ ## ¥°¥é¥Õ¤ä¥Ú¡¼¥¸¤ÎǤ°Õ¤Î°ÌÃÖ¤ËÇÛÃÖ¤·¥¹¥±¡¼¥ëÊÑ´¹¤â²Äǽ #b ³Èĥʸ»úÎó¥â¡¼¥É¤Ç \U+xxxx (xxxx ¤Ï 16 ¿ÊÃͤΠ4 ¤Þ¤¿¤Ï 5 ʸ»ú) ¤Ç @@ -603,7 +605,7 @@ D epi_data 1 #b 3 ¼¡¸µÉÁ²è¥¹¥¿¥¤¥ë `zerrorfill` #b 3 ¼¡¸µ¸÷¸»¥â¥Ç¥ë¤Ç±¢±Æ¤ÈÈ¿¼Í¸÷¥Ï¥¤¥é¥¤¥È¤òÄó¶¡ (°Ê²¼»²¾È: `lighting`) #b ÇÛÎó¥Ç¡¼¥¿·¿¤È´ØÏ¢¤¹¤ë¥³¥Þ¥ó¥É¤ä±é»»»Ò¡£°Ê²¼»²¾È: `arrays`¡£ -#b ¿·¤·¤¤½ÐÎÏ·Á¼° `sizelgd`, `domterm` +#b ¿·¤·¤¤½ÐÎÏ·Á¼° `sixelgd`, `domterm` #b ÁêÂлþ´Ö (´Ö³ÖĹ) ¤ò½èÍý¤¹¤ë¿·¤·¤¤½ñ¼°»ØÄê»Ò tH tM tS¡£ ## °Ê²¼»²¾È: `time_specifiers`¡£ #end @@ -2327,7 +2329,7 @@ C C 4 weekdata_cdc °Ê²¼»²¾È: `splot voxel-grids`, `vgrid`¡£ @end table -4 À°¿ôÊÑ´¹´Ø¿ô (integer conversion functions): int floor ceil round +4 À°¿ôÊÑ´¹´Ø¿ô (int floor ceil round) (integer conversion functions) ?integer conversion ?integer ?precision @@ -6567,7 +6569,7 @@ Ffigure_zerror ¥ç¥ó¤òɽ¼¨¤¹¤ë¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£ ¥Þ¥¦¥¹¤¬»È¤¨¤Ê¤¤½ÐÎÏ·Á¼°¤Ç¤â¡¢¤¢¤ë¼ï¤Î¥¢¥Ë¥á¡¼¥·¥ç¥ó¤ò¥µ¥Ý¡¼¥È¤¹¤ë¤â¤Î - ¤¬¤¢¤ê¤Þ¤¹¡£°Ê²¼»²¾È: `term sixelgd animate`, `term domterm animate`¡£ + ¤¬¤¢¤ê¤Þ¤¹¡£°Ê²¼»²¾È: `term sixelgd`, `term kittycairo`¡£ ¥¢¥Ë¥á¡¼¥·¥ç¥ó¤ò¥Õ¥¡¥¤¥ë¤È¤·¤ÆÊݸ¤·¤Æ¡¢¸å¤Ç¼ê¸µ¤ÇºÆÀ¸¤·¤¿¤ê Web ¥Ú¡¼ ¥¸¤ËËä¤á¹þ¤ó¤À¤ê¤Ç¤­¤ë½ÐÎÏ·Á¼°¤¬ 2 ¤Ä¤¢¤ê¤Þ¤¹¡£°Ê²¼»²¾È: @@ -7812,7 +7814,7 @@ Ffigure_zerror 3 pause Ãæ¤Îµ¿»÷¥Þ¥¦¥¹Áàºî (pseudo-mousing during pause) ?commands pause pseudo-mousing ?pseudo-mousing - `dumb`, `sixel`, `block`, `domterm` ½ÐÎÏ·Á¼°¤Î¤è¤¦¤Ë¡¢Ê¸»úÎó½ÐÎϤȥ°¥é + `dumb`, `sixel`, `kitty`, `domterm` ½ÐÎÏ·Á¼°¤Î¤è¤¦¤Ë¡¢Ê¸»úÎó½ÐÎϤȥ°¥é ¥Õ¥£¥Ã¥¯É½¼¨¤òƱ¤¸¥¦¥£¥ó¥É¥¦¤Ç¹Ô¤¦½ÐÎÏ·Á¼°¤¬¤¢¤ê¤Þ¤¹¡£¤³¤ì¤é¤Î½ÐÎÏ·Á¼° ¤Ç¤Ï¡¢º£¤Î¤È¤³¤í¼Â¼ÁŪ¤Ë¥Þ¥¦¥¹Æ°ºî¤ò¥µ¥Ý¡¼¥È¤·¤Æ¤¤¤Þ¤»¤ó¤¬¡¢¥³¥Þ¥ó¥É `pause mouse` ¤Î´Ö¤Ï¡¢¥Þ¥¦¥¹Æ°ºî¤¬²Äǽ¤Ê½ÐÎÏ·Á¼°¤Î¾ì¹ç¤ÈƱ¤¸»ÅÁȤߤǥ­ @@ -11039,7 +11041,6 @@ D discrete 3 { size x, y } { front | back } { noborder | bdefault | border } - {cbtics } } show colorbox unset colorbox @@ -11073,9 +11074,6 @@ D discrete 3 ÉÁ²è¤·¤Þ¤¹¡£`bdefault` (¥Ç¥Õ¥©¥ë¥È) ¤Ï¡¢¥«¥é¡¼¥Ü¥Ã¥¯¥¹¤Î¶­³¦¤ÎÉÁ²è¤Ë¥Ç ¥Õ¥©¥ë¥È¤Î¶­³¦¤Î line style ¤ò»È¤¤¤Þ¤¹¡£ - `cbtics` ¤Ï¡¢¥«¥é¡¼¥Ü¥Ã¥¯¥¹¤ÎÌÜÀ¹¤ê (cbtics) ¤ËÂФ·¤Æ¡¢¶­³¦¤Î¥é¥¤¥ó¥¹ - ¥¿¥¤¥ë¤È¤Ï°Û¤Ê¤ëÀþ¼ï¤ò»ØÄꤹ¤ë¤Î¤Ë»È¤¨¤Þ¤¹¡£ - ¥«¥é¡¼¥Ü¥Ã¥¯¥¹¤Î¼´¤Ï `cb` ¤È¸Æ¤Ð¤ì¡¢Ä̾ï¤Î¼´¤Î¥³¥Þ¥ó¥É¤ÇÀ©¸æ¤µ¤ì¤Þ¤¹¡£ ¤¹¤Ê¤ï¤Á `set/unset/show` ¤Ç `cbrange`, `[m]cbtics`, `format cb`, `grid [m]cb`, `cblabel` ¤Ê¤É¤¬¡¢¤½¤·¤Æ¿ʬ `cbdata`, `[no]cbdtics`, @@ -11161,7 +11159,7 @@ Ffigure_colornames set table $datablock splot DATA with lines nosurface unset table - # Åù¹âÀþ¤Ï $datablock ¤Ë¡¢1 ¤Ä¤ÎÅù¹âÀþ¤¬ 1 ¤Ä¤Î index ¤Ç + # Åù¹âÀþ¤Ï $datablock ¤Ë¡¢1 ¤Ä¤ÎÅù¹âÀþ¤¬ 1 ¤Ä¤Î index ¤Ç plot for [level=0:*] $datablock index level with lines °Ê²¼¤â»²¾È: `splot datafile`¡£¤Þ¤¿¡¢ @@ -11240,7 +11238,7 @@ D dashtypes 2 ¸½ºß¤Ï¡¢¤½¤Î¤è¤¦¤Ê¥ª¥×¥·¥ç¥ó¤¬¤¤¤¯¤Ä¤«¼ÂÁõ¤µ¤ì¤Æ¤¤¤Þ¤¹¡£¤½¤ÎÀßÄê¤Ï¡¢¤½ ¤Î¸å¤Î¥³¥Þ¥ó¥É¤ÇÆɤ߽Фµ¤ì¤ë¤¹¤Ù¤Æ¤Î¥Ç¡¼¥¿¥Õ¥¡¥¤¥ë¤Ë°ìÍͤËŬÍѤ·¤Þ¤¹¤¬¡¢ ¤½¤ì¤È¤ÏÌ·½â¤¹¤ë½ñ¼°¤Ç¥Õ¥¡¥¤¥ë¤òƱ»þ¤ËÁàºî¤·¤Ê¤±¤ì¤Ð¤¤¤±¤Ê¤¤¾ì¹ç¡¢¤³¤ì - ¤ò²óÈò¤¹¤ëÊýË¡¤Ë´Ø¤·¤Æ¤Ï¡¢°Ê²¼»²¾È: `functionbocks`¡£ + ¤ò²óÈò¤¹¤ëÊýË¡¤Ë´Ø¤·¤Æ¤Ï¡¢°Ê²¼»²¾È: `functionblocks`¡£ 4 set datafile columnheaders ?set datafile columnheaders =columnheaders @@ -13096,7 +13094,7 @@ Ffigure_multiple_keys ¤òºÆÄêµÁ¤¹¤ë¤³¤È¤ò²Äǽ¤Ë¤·¤Þ¤¹¡£¤³¤Î¥³¥Þ¥ó¥É¤Î¥ª¥×¥·¥ç¥ó¤Ï¡¢ "set style line" ¤Î¤â¤Î¤ÈÁ´¤¯Æ±¤¸¤Ç¤¹¡£¥é¥¤¥ó¥¹¥¿¥¤¥ë¤È°ã¤¦¤È¤³¤í¤Ï¡¢ `set linetype` ¤Ë¤è¤ëºÆÄêµÁ¤Ï±Ê³Ū¤Ê¤³¤È¤Ç¡¢¤³¤ì¤Ï `reset` ¤Î±Æ¶Á¤ò¼õ - ¤±¤Þ¤»¤ó¡£ + ¤±¤Þ¤»¤ó¡£¤·¤«¤·¡¢`reset session` ¤Ç½é´üÀþ¼ï¤Î°À­¤òÉüµ¢¤·¤Þ¤¹¡£ Î㤨¤Ð¡¢Àþ¼ï 1 ¤È 2 ¤ò°Ê²¼¤Î¤è¤¦¤ËºÆÄêµÁ¤·¤Æ¤ß¤Þ¤¹: @@ -14903,7 +14901,7 @@ D viridis 1 set style line 102 lc "blue" set pm3d depthorder do for [i=0:N] { - splot f(x,y) with pm3d fillcolor ls 101 zclip [* : zmax-(i*delta)] + splot f(x,y) with pm3d fillcolor ls 101 zclip [* : zmax-(i*delta)] pause 0.2 # ¥¢¥Ë¥á¡¼¥·¥ç¥ó¥Õ¥ì¡¼¥à´Ö³Ö¤Ï 1/5 Éà } @@ -18385,12 +18383,12 @@ Ffigure_sparsematrix ¤¹¡£matrix ¥Ç¡¼¥¿¤Î¹Ô¤ÈÎó¤ÎÈÖ¹æ¤Ï¡¢0 ¤«¤é»Ï¤Þ¤ê¡¢¤è¤Ã¤ÆÈÖ¹æ N ¤ÎÎó¤Ï¡¢ (N+1) ÈÖÌܤǤ¢¤ë¤³¤È¤ËÃí°Õ¤·¤Æ¤¯¤À¤µ¤¤¡£ ½ñ¼°: - plot 'file' every {} - {:{} - {:{} - {:{} - {:{} - {:}}}}} + plot 'file' matrix every {} + {:{} + {:{} + {:{} + {:{} + {:}}}}} Îã: plot 'file' matrix every :::N::N # N È֤ιԤΤ¹¤Ù¤Æ¤ÎÃͤòÉÁ²è plot 'file' matrix every ::3::7 # ¤¹¤Ù¤Æ¤Î¹Ô¤Î 3-7 Îó¤òÉÁ²è @@ -18944,10 +18942,13 @@ D viridis 1 3 warnings ?unset warnings ?set warnings - ·Ù¹ð¥á¥Ã¥»¡¼¥¸ (Ã×̿Ū¤Ê¥¨¥é¡¼¤Ç¤Ï¤Ê¤¤) ¤Ï¡¢Ä̾ï¤Ï¤½¤Î·Ù¹ð¤ò°ú¤­µ¯¤³¤¹ - ¥³¥Þ¥ó¥É¥é¥¤¥ó¤ò¥¨¥³¡¼¤·¤¿¸å¤Ç stderr ¤Ë½ÐÎϤµ¤ì¤Þ¤¹¡£¤³¤Î·Ù¹ð¤Ï¡¢¥³¥Þ - ¥ó¥É `unset warnings` ¤ÇÍÞÀ©¤Ç¤­¡¢ÌÀ¼¨Åª¤Ë `set warnings` ¤ÇÍ­¸ú¤Ë¤µ¤ì - ¤ë¤Þ¤ÇÍÞÀ©¤µ¤ì³¤±¤Þ¤¹¡£ + set warnings + unset warnings + + Ã×̿Ū¤Ç¤Ï¤Ê¤¤¥¨¥é¡¼¤ËÂФ¹¤ë·Ù¹ð¥á¥Ã¥»¡¼¥¸¤Ï¡¢Ä̾ï¤Ï¤½¤Î·Ù¹ð¤ò°ú¤­µ¯¤³ + ¤¹¥³¥Þ¥ó¥É¥é¥¤¥ó¤ò¥¨¥³¡¼¤·¤¿¸å¤Ç stderr ¤Ë½ÐÎϤ·¤Þ¤¹¡£¤³¤Î·Ù¹ð¤Ï¡¢¥³¥Þ + ¥ó¥É `unset warnings` ¤ÇÍÞÀ©¤Ç¤­¤Þ¤¹¡£¤½¤ì¤ÏÌÀ¼¨Åª¤Ë `set warnings` ¤Ç + Í­¸ú¤Ë¤¹¤ë¤Þ¤ÇÍÞÀ©¤·Â³¤±¤Þ¤¹¡£ 2 update ?commands update ?update diff --git a/docs/gnuplot.doc b/docs/gnuplot.doc index 7f46962d0..32727fe20 100644 --- a/docs/gnuplot.doc +++ b/docs/gnuplot.doc @@ -290,6 +290,9 @@ C ## polar gridded surface. For each input data point it generates a single ## annular wedge in a conceptual polar grid. Unlike polar mode `with surface` ## it can be used in either a polar or cartesian coordinate graph. +#b New 2D plot style `with hsteps` allows construction of step-like plots with +## a variety of representations in addition to those offered by existing styles +## `steps`, `histeps`, `fsteps`, and `fillsteps`. See `hsteps`. #b Plot style `with lines` now has a filter option `sharpen`. This filter ## detects spikes in a function plot that appear truncated in the output ## because the peak lies between two x-coordinates at which the function has @@ -316,6 +319,9 @@ D sharpen 1 D iris 2 DB D contourfill 4 +DB +D logic_timing 1 +D rank_sequence 1 3 Hulls, masks, and smoothing ?new hulls @@ -5026,6 +5032,24 @@ Ffigure_contourfill set view map splot g(x,y) with contourfill, g(x,y) with lines nosurface +2 dots +?plotting styles dots +?style dots +?with dots +?dots +Ffigure_dots + The `dots` style plots a tiny dot at each point; this is useful for scatter + plots with many points. Either 1 or 2 columns of input data are required in + 2D. Three columns are required in 3D. + + For some terminals (post, pdf) the size of the dot can be controlled by + changing the linewidth. + + 1 column y # x is row number + 2 columns: x y + 3 columns: x y z # 3D only (splot) + +#TeX \newpage 2 ellipses ?plotting styles ellipses ?style ellipses @@ -5080,23 +5104,6 @@ Ffigure_ellipses See also `set object ellipse`, `set style ellipse` and `fillstyle`. -2 dots -?plotting styles dots -?style dots -?with dots -?dots -Ffigure_dots - The `dots` style plots a tiny dot at each point; this is useful for scatter - plots with many points. Either 1 or 2 columns of input data are required in - 2D. Three columns are required in 3D. - - For some terminals (post, pdf) the size of the dot can be controlled by - changing the linewidth. - - 1 column y # x is row number - 2 columns: x y - 3 columns: x y z # 3D only (splot) - 2 filledcurves ?plotting styles filledcurves ?style filledcurves @@ -5547,6 +5554,128 @@ Ffigure_newhist ^ D histogram_colors 1 +2 hsteps +?plotting styles hsteps +?style hsteps +?with hsteps +?hsteps + The 2D plotting style `with hsteps` renders a horizontal line segment ("step") + for each data point. The step may extend to the left, to the right, or to + both sides of the point's x-coordinate. + Additional keywords control the lines connecting adjacent steps and option + area fill between the step and a baseline y value. + + Syntax: + plot with hsteps + {forward|backward} + {baseline|pillars|link|nolink} + {{above|below} y=} + {offset } + + 2 columns: x y + 3 columns: x y width + + This plot style requires 2 or 3 columns of data. Additional input columns can + be used to provide variable line or fill colors (see `rgbcolor variable`). + The x values of the input data are assumed to be monotonic. + + If the width of each step is not explicitly given through a third input + column, each segment’s width is calculated so that it abuts the adjacent + horizontal segments. A negative value in column 3 will be treated as a + request for a full-width step. + + The `forward` and `backward` keywords can be used to specify the direction + in which the horizontal segment extends from the given x coordinate. + If neither is specified, the horizontal segment extends on both sides + of the given x-value halfway to the x-value of the next adjacent point. + However, for the first and last points, where there are no corresponding outer + adjacent points, the horizontal segments are extrapolated using distances to + the adjacent inner points (see `histeps`, `boxes`). + + The default (`baseline`) and `pillar` variants employ a baseline y value. + If not provided in the plot command, the baseline is taken to be y=0. + If the plot command uses a fill style, the baseline also serves to + delimit one boundary of the fill area. + Four style variants are possible. + +Ffigure_hsteps_baseline + `baseline` (default): If there is no gap along x between adjacent steps, + they are connected by a vertical line segment between them. This produces + a curve like the `steps`, `histeps`, or `fsteps` styles. If there is a gap + between steps, usually because the width is less than the point spacing, + the connecting line drops to the baseline and continues along it before + rising again. This produces a sequence of rectangular pulses. + + set xzeroaxis + plot $data using 1:2 with hsteps + plot $data using 1:2:(0.5) with hsteps + +Ffigure_hsteps_pillar + `pillar`: At each end of each step a vertical line is drawn to the baseline. + Note that no horizontal line segments are drawn at the baseline. + + plot $data using 1:2 with hsteps pillar + plot $data using 1:2:(0.5) with hsteps pillar + plot $data using 1:2:(0.5) \ + with hsteps pillar above fc "blue", \ + $data using 1:2:(0.5) \ + with hsteps pillar below fc "red" + +#TeX \vspace{6ex} + +Ffigure_hsteps_nolink + `nolink`: No connecting line is drawn between adjacent steps. + Baseline and fill properties are not relevant to this variant. + + plot $data using 1:2 with hsteps nolink, \ + $data using 1:2 with hsteps nolink forward, \ + $data using 1:2 with hsteps nolink backward, \ + $data using 1:2 with points pt "|" + +#TeX \vspace{9ex} + +Ffigure_hsteps_link + `link`: Adjacent steps steps are connected by a single straight line segment. + Depending on the step widths, this line may be diagonal rather than vertical. + + Example: The `link` variant can be superimposed onto the `pillar` variant to + produce a stacked histogram plot in which category boundaries are connected. + + set style line 11 lw 2 lc "gray" dt "." + set style line 12 lw 2 lc variable + plot $data using 1:3:(0.5) ls 11 with hsteps link, \ + $data using 1:3:(0.5):1 ls 12 with hsteps pillar fs solid 0.7 border, \ + $data using 1:4:(0.5) ls 11 with hsteps link, \ + $data using 1:4:(0.5):1 ls 12 with hsteps pillar fs transparent pattern 1 border + +3 offset +Ffigure_hsteps_offset +?with hsteps offset +?hsteps offset + The offset value modifies any of the `with hsteps` variants by adding an + increment to the y value of both the data point itself (column 2) and the + baseline of the plot it appears in. An example of use is to draw a logic + circuit timing chart in which pulse waveforms are aligned vertically. + In general the offset can be used to stack plots from multiple data sets + that share a common range of y values. + + # bit(k,char) is a function that returns 0 or 1 + # for the state of bit k in an ASCII character + set style fill solid 0.2 border + plot for [k=1:8] STR using 1:(bit(k,STR[$1])):(0.5) \ + with hsteps fillcolor "black" offset k + +3 missing data +?with hsteps missing-data +?hsteps missing-data + In the hsteps style, empty lines, NaN values, and missing data have distinct + meanings. If an empty line is present in the data, the data series is reset + at that point. This is analogous to a blank line causing a break to start a + new curve in the case of `with lines`. If an x-value contains NaN, it is + processed in the same manner as an empty line. If the x-value is valid but + the y-value contains NaN, no horizontal line is drawn for that particular data + point but the x-value is still used if needed to estimate the step width. + 2 image ?plotting styles image ?style image @@ -5839,13 +5968,7 @@ Ffigure_parallel plot $DATA using col1{:varcol1} {at } { # slice at each z axis tick matching level - set contourfill cbtics # slice at each cb axis tick matching level + set contourfill ztics # slice at each z axis major tick + set contourfill cbtics # slice at each cb axis major tick set contourfill {palette | firstlinetype N} The default is `set contourfill auto 5 palette`, which splits the current z range into five equal slices (6 bounding planes) and assigns each slice the palette mapped color of its midpoint z value. - The options `ztics` or `cbtics` place split zrange by slicing at major axis - tick (level 0) or minor tick (level 1) or tick at some other level set - explicitly by the user. For example to slice specifically at z=2.5, z=7 and - z=10 independent of the major and minor tics you could use the commands below. - set ztics add ("floor" 2.5 3, "boundary X" 7 3, "ceiling" 10 3) - set contourfill ztics 3 - set ztics scale 1, 0.5, 0, 0, 0 + The options `ztics` or `cbtics` place split zrange by slicing at major ticks + along that axis. For example to slice specifically at z=2.5, z=7 and z=10 + you could use the commands below. + set ztics add ("floor" 2.5, "boundary X" 7, "ceiling" 10) + set contourfill ztics If you do not want to use palette coloring for the sections, you can choose any arbitrary range of successive linetypes and assign them the desired color @@ -12926,8 +13058,9 @@ Ffigure_multiple_keys ?show linetype The `set linetype` command allows you to redefine the basic linetypes used for plots. The command options are identical to those for "set style line". - Unlike line styles, redefinitions by `set linetype` are persistent; they - are not affected by `reset`. + Unlike line styles, redefinitions by `set linetype` are persistent. + They are not affected by `reset`. However the initial linetype properties + are restored by `reset session`. For example, whatever linetypes one and two look like to begin with, if you redefine them like this: @@ -18749,8 +18882,8 @@ D viridis 1 if/else statements. See also `do`, `continue`, `break`. 1 Terminal types ^

    Terminal Types

    -2 complete list of terminals ?complete list of terminals +2 complete list of terminals ?terminal ?term Gnuplot supports a large number of output formats. These are selected by diff --git a/docs/html/.gitignore b/docs/html/.gitignore index ee0364bf3..4688e99e2 100644 --- a/docs/html/.gitignore +++ b/docs/html/.gitignore @@ -1,4 +1,5 @@ *.html *.svg *.webp +figure_mask.png index.hhk diff --git a/docs/plotstyles.gnu b/docs/plotstyles.gnu index e3e4c0b39..d02c37b34 100644 --- a/docs/plotstyles.gnu +++ b/docs/plotstyles.gnu @@ -394,6 +394,151 @@ plot $data using (22.5*($2-1-0.5)):(0.01):(22.5):($3/STATS_sum_y) with sectors \ reset +########################################################## +# hsteps +########################################################## +$data <> (i-1)) & 0x1 +char(i) = sprintf( "%c", DATA[i] ) + +plot for [k=1:8] \ + DATA using 1:(0.8 * bit(k)):(0.5) with hsteps offset k lw 2 fc black, \ + DATA using 1:(0.5):(char($1)) with labels font ",16" tc 'red' + +reset + # # 3D Plot styles # ============== @@ -1305,7 +1450,7 @@ set cntrlabel onecolor unset colorbox; unset hidden3d; unset key set tics format "" set palette viridis -set contourfill ztics level 0 +set contourfill ztics set pm3d scansauto border retrace set sample 51; set isosample 51 set view map diff --git a/docs/term-ja.diff b/docs/term-ja.diff index 6e8d73b4c..be5493bc8 100644 --- a/docs/term-ja.diff +++ b/docs/term-ja.diff @@ -1,6 +1,6 @@ diff -ru term/ai.trm.ORG term/ai.trm ---- term/ai.trm 2023-05-26.ORG 13:57:54.000000000 +0900 -+++ term/ai.trm 2023-05-29 17:28:05.979960000 +0900 +--- term/ai.trm 2023-08-28.ORG 18:55:39.000000000 +0900 ++++ term/ai.trm 2023-08-29 11:12:04.593708000 +0900 @@ -526,6 +526,7 @@ #ifdef TERM_HELP @@ -33,8 +33,8 @@ diff -ru term/ai.trm.ORG term/ai.trm END_HELP(ai) #endif /* TERM_HELP */ diff -ru term/aquaterm.trm.ORG term/aquaterm.trm ---- term/aquaterm.trm 2023-05-26.ORG 13:57:54.000000000 +0900 -+++ term/aquaterm.trm 2023-05-29 17:28:05.980069000 +0900 +--- term/aquaterm.trm 2023-08-28.ORG 18:55:39.000000000 +0900 ++++ term/aquaterm.trm 2023-08-29 11:12:04.593820000 +0900 @@ -1047,6 +1047,7 @@ #ifdef TERM_HELP @@ -84,8 +84,8 @@ diff -ru term/aquaterm.trm.ORG term/aquaterm.trm #endif /* TERM_HELP */ diff -ru term/be.trm.ORG term/be.trm ---- term/be.trm 2023-05-26.ORG 13:57:54.000000000 +0900 -+++ term/be.trm 2023-05-29 17:28:05.980186000 +0900 +--- term/be.trm 2023-08-28.ORG 18:55:39.000000000 +0900 ++++ term/be.trm 2023-08-29 11:12:04.593932000 +0900 @@ -387,6 +387,7 @@ #ifdef TERM_HELP @@ -397,8 +397,8 @@ diff -ru term/be.trm.ORG term/be.trm END_HELP(be) #endif /* TERM_HELP */ diff -ru term/block.trm.ORG term/block.trm ---- term/block.trm 2023-05-26.ORG 13:57:54.000000000 +0900 -+++ term/block.trm 2023-05-29 17:28:05.980308000 +0900 +--- term/block.trm 2023-08-28.ORG 18:55:39.000000000 +0900 ++++ term/block.trm 2023-08-29 11:12:04.594063000 +0900 @@ -1370,6 +1370,7 @@ #ifdef TERM_HELP @@ -495,8 +495,8 @@ diff -ru term/block.trm.ORG term/block.trm END_HELP(block) #endif diff -ru term/caca.trm.ORG term/caca.trm ---- term/caca.trm 2023-05-26.ORG 13:57:54.000000000 +0900 -+++ term/caca.trm 2023-05-29 17:28:05.980514000 +0900 +--- term/caca.trm 2023-08-28.ORG 18:55:39.000000000 +0900 ++++ term/caca.trm 2023-08-29 11:12:04.594247000 +0900 @@ -1263,7 +1263,7 @@ if (CACA_charset == CACA_ASCII) symbol = (point <= -1) ? L'.' : point % 26 + 'A'; @@ -673,8 +673,8 @@ diff -ru term/caca.trm.ORG term/caca.trm #endif /* TERM_HELP */ diff -ru term/cairo.trm.ORG term/cairo.trm ---- term/cairo.trm 2023-05-26.ORG 13:57:54.000000000 +0900 -+++ term/cairo.trm 2023-05-29 17:28:05.980708000 +0900 +--- term/cairo.trm 2023-08-28.ORG 18:55:39.000000000 +0900 ++++ term/cairo.trm 2023-08-29 11:12:04.594420000 +0900 @@ -1586,6 +1586,7 @@ #ifdef TERM_HELP @@ -1099,7 +1099,7 @@ diff -ru term/cairo.trm.ORG term/cairo.trm +" {{no}enhanced} {mono|color}", +" {font } {fontscale }", +" {linewidth } {rounded|butt|square} {dashlength
    }", -+" {background }", ++" {transparent | background }", +" {size ,} {anchor|scroll}", +"", +" ¤³¤Î½ÐÎÏ·Á¼°¤Ï¡¢¥é¥Ù¥ë¤ä¾¤Îʸ»úÎó½èÍý¤Ë¥Ç¥Õ¥©¥ë¥È¤Ç³Èĥʸ»úÎó½èÍý¤ò»È", @@ -1125,8 +1125,8 @@ diff -ru term/cairo.trm.ORG term/cairo.trm #endif /* HAVE_KITTY_TERM */ diff -ru term/canvas.trm.ORG term/canvas.trm ---- term/canvas.trm 2023-05-26.ORG 13:57:54.000000000 +0900 -+++ term/canvas.trm 2023-05-29 17:28:05.980852000 +0900 +--- term/canvas.trm 2023-08-28.ORG 18:55:39.000000000 +0900 ++++ term/canvas.trm 2023-08-29 11:12:04.594555000 +0900 @@ -1670,6 +1670,7 @@ #ifdef TERM_HELP @@ -1222,8 +1222,8 @@ diff -ru term/canvas.trm.ORG term/canvas.trm END_HELP(canvas) #endif /* TERM_HELP */ diff -ru term/cgm.trm.ORG term/cgm.trm ---- term/cgm.trm 2023-05-26.ORG 13:57:54.000000000 +0900 -+++ term/cgm.trm 2023-05-29 17:28:05.981048000 +0900 +--- term/cgm.trm 2023-08-28.ORG 18:55:39.000000000 +0900 ++++ term/cgm.trm 2023-08-29 11:12:04.594718000 +0900 @@ -1743,6 +1743,7 @@ #ifdef TERM_HELP @@ -1546,9 +1546,9 @@ diff -ru term/cgm.trm.ORG term/cgm.trm END_HELP(cgm) #endif /* TERM_HELP */ diff -ru term/context.trm.ORG term/context.trm ---- term/context.trm 2023-05-26.ORG 13:57:54.000000000 +0900 -+++ term/context.trm 2023-05-29 17:28:05.981227000 +0900 -@@ -1971,6 +1971,7 @@ +--- term/context.trm 2023-08-28.ORG 18:55:39.000000000 +0900 ++++ term/context.trm 2023-08-29 11:12:04.594871000 +0900 +@@ -1972,6 +1972,7 @@ #ifdef TERM_HELP START_HELP(context) @@ -1556,7 +1556,7 @@ diff -ru term/context.trm.ORG term/context.trm "1 context", "?commands set terminal context", "?set terminal context", -@@ -2114,6 +2115,158 @@ +@@ -2115,6 +2116,158 @@ " \\useGNUPLOTgraphic[sin]", " \\stoptext", " This will run gnuplot automatically and include the resulting figure in the document." @@ -1716,8 +1716,8 @@ diff -ru term/context.trm.ORG term/context.trm #endif /* TERM_HELP */ diff -ru term/corel.trm.ORG term/corel.trm ---- term/corel.trm 2023-05-26.ORG 13:57:54.000000000 +0900 -+++ term/corel.trm 2023-05-29 17:28:05.981306000 +0900 +--- term/corel.trm 2023-08-28.ORG 18:55:39.000000000 +0900 ++++ term/corel.trm 2023-08-29 11:12:04.594961000 +0900 @@ -431,6 +431,7 @@ #ifdef TERM_HELP @@ -1751,8 +1751,8 @@ diff -ru term/corel.trm.ORG term/corel.trm END_HELP(corel) #endif /* TERM_HELP */ diff -ru term/debug.trm.ORG term/debug.trm ---- term/debug.trm 2023-05-26.ORG 13:57:54.000000000 +0900 -+++ term/debug.trm 2023-05-29 17:28:05.981380000 +0900 +--- term/debug.trm 2023-08-28.ORG 18:55:39.000000000 +0900 ++++ term/debug.trm 2023-08-29 11:12:04.595034000 +0900 @@ -372,6 +372,7 @@ #ifdef TERM_HELP @@ -1779,8 +1779,8 @@ diff -ru term/debug.trm.ORG term/debug.trm END_HELP(debug) #endif diff -ru term/djsvga.trm.ORG term/djsvga.trm ---- term/djsvga.trm 2023-05-26.ORG 13:57:54.000000000 +0900 -+++ term/djsvga.trm 2023-05-29 17:28:05.981546000 +0900 +--- term/djsvga.trm 2023-08-28.ORG 18:55:39.000000000 +0900 ++++ term/djsvga.trm 2023-08-29 11:12:04.595169000 +0900 @@ -2237,6 +2237,7 @@ #ifdef TERM_HELP @@ -1829,8 +1829,8 @@ diff -ru term/djsvga.trm.ORG term/djsvga.trm END_HELP(svga) #endif /* TERM_HELP */ diff -ru term/dumb.trm.ORG term/dumb.trm ---- term/dumb.trm 2023-05-26.ORG 13:57:54.000000000 +0900 -+++ term/dumb.trm 2023-05-29 17:28:05.981667000 +0900 +--- term/dumb.trm 2023-08-28.ORG 18:55:39.000000000 +0900 ++++ term/dumb.trm 2023-08-29 11:12:04.595290000 +0900 @@ -1206,6 +1206,7 @@ #ifdef TERM_HELP @@ -1937,8 +1937,8 @@ diff -ru term/dumb.trm.ORG term/dumb.trm END_HELP(dumb) #endif /* TERM_HELP */ diff -ru term/dxf.trm.ORG term/dxf.trm ---- term/dxf.trm 2023-05-26.ORG 13:57:54.000000000 +0900 -+++ term/dxf.trm 2023-05-29 17:28:05.981746000 +0900 +--- term/dxf.trm 2023-08-28.ORG 18:55:39.000000000 +0900 ++++ term/dxf.trm 2023-08-29 11:12:04.595361000 +0900 @@ -400,6 +400,7 @@ #ifdef TERM_HELP @@ -1970,8 +1970,8 @@ diff -ru term/dxf.trm.ORG term/dxf.trm END_HELP(dxf) #endif /* TERM_HELP */ diff -ru term/dxy.trm.ORG term/dxy.trm ---- term/dxy.trm 2023-05-26.ORG 13:57:54.000000000 +0900 -+++ term/dxy.trm 2023-05-29 17:28:05.981813000 +0900 +--- term/dxy.trm 2023-08-28.ORG 18:55:39.000000000 +0900 ++++ term/dxy.trm 2023-08-29 11:12:04.595422000 +0900 @@ -188,6 +188,7 @@ #ifdef TERM_HELP @@ -1999,8 +1999,8 @@ diff -ru term/dxy.trm.ORG term/dxy.trm END_HELP(dxy800a) #endif diff -ru term/eepic.trm.ORG term/eepic.trm ---- term/eepic.trm 2023-05-26.ORG 13:57:54.000000000 +0900 -+++ term/eepic.trm 2023-05-29 17:28:05.981913000 +0900 +--- term/eepic.trm 2023-08-28.ORG 18:55:39.000000000 +0900 ++++ term/eepic.trm 2023-08-29 11:12:04.595507000 +0900 @@ -578,6 +578,7 @@ #ifdef TERM_HELP @@ -2117,8 +2117,8 @@ diff -ru term/eepic.trm.ORG term/eepic.trm END_HELP(eepic) #endif /* TERM_HELP */ diff -ru term/emf.trm.ORG term/emf.trm ---- term/emf.trm 2023-05-26.ORG 13:57:54.000000000 +0900 -+++ term/emf.trm 2023-05-29 17:28:05.982056000 +0900 +--- term/emf.trm 2023-08-28.ORG 18:55:39.000000000 +0900 ++++ term/emf.trm 2023-08-29 11:12:04.595661000 +0900 @@ -1981,6 +1981,7 @@ #ifdef TERM_HELP @@ -2175,8 +2175,8 @@ diff -ru term/emf.trm.ORG term/emf.trm END_HELP(emf) #endif /* TERM_HELP */ diff -ru term/epson.trm.ORG term/epson.trm ---- term/epson.trm 2023-05-26.ORG 13:57:54.000000000 +0900 -+++ term/epson.trm 2023-05-29 17:28:05.982165000 +0900 +--- term/epson.trm 2023-08-28.ORG 18:55:39.000000000 +0900 ++++ term/epson.trm 2023-08-29 11:12:04.595755000 +0900 @@ -1081,6 +1081,7 @@ #ifdef TERM_HELP @@ -2286,8 +2286,8 @@ diff -ru term/epson.trm.ORG term/epson.trm END_HELP(epson_180dpi) #endif /* TERM_HELP */ diff -ru term/excl.trm.ORG term/excl.trm ---- term/excl.trm 2023-05-26.ORG 13:57:54.000000000 +0900 -+++ term/excl.trm 2023-05-29 17:28:05.982307000 +0900 +--- term/excl.trm 2023-08-28.ORG 18:55:39.000000000 +0900 ++++ term/excl.trm 2023-08-29 11:12:04.595897000 +0900 @@ -270,6 +270,7 @@ #ifdef TERM_HELP @@ -2315,8 +2315,8 @@ diff -ru term/excl.trm.ORG term/excl.trm END_HELP(excl) #endif diff -ru term/fig.trm.ORG term/fig.trm ---- term/fig.trm 2023-05-26.ORG 13:57:54.000000000 +0900 -+++ term/fig.trm 2023-05-29 17:28:05.982449000 +0900 +--- term/fig.trm 2023-08-28.ORG 18:55:39.000000000 +0900 ++++ term/fig.trm 2023-08-29 11:12:04.596054000 +0900 @@ -1314,6 +1314,7 @@ #ifdef TERM_HELP @@ -2399,8 +2399,8 @@ diff -ru term/fig.trm.ORG term/fig.trm #endif /* TERM_HELP */ diff -ru term/gd.trm.ORG term/gd.trm ---- term/gd.trm 2023-05-26.ORG 13:57:54.000000000 +0900 -+++ term/gd.trm 2023-05-29 17:28:05.982664000 +0900 +--- term/gd.trm 2023-08-28.ORG 18:55:39.000000000 +0900 ++++ term/gd.trm 2023-08-29 11:12:04.596288000 +0900 @@ -2507,6 +2507,7 @@ #ifndef JPEG_HELP_ONLY #ifdef TERM_HELP @@ -2830,8 +2830,8 @@ diff -ru term/gd.trm.ORG term/gd.trm #endif /* TERM_HELP */ #endif /* WITH_GD_KITTY */ diff -ru term/ggi.trm.ORG term/ggi.trm ---- term/ggi.trm 2023-05-26.ORG 13:57:54.000000000 +0900 -+++ term/ggi.trm 2023-05-29 17:28:05.982791000 +0900 +--- term/ggi.trm 2023-08-28.ORG 18:55:39.000000000 +0900 ++++ term/ggi.trm 2023-08-29 11:12:04.596398000 +0900 @@ -1508,6 +1508,7 @@ #ifdef TERM_HELP @@ -2884,8 +2884,8 @@ diff -ru term/ggi.trm.ORG term/ggi.trm END_HELP(ggi) #endif diff -ru term/gpic.trm.ORG term/gpic.trm ---- term/gpic.trm 2023-05-26.ORG 13:57:54.000000000 +0900 -+++ term/gpic.trm 2023-05-29 17:28:05.982867000 +0900 +--- term/gpic.trm 2023-08-28.ORG 18:55:39.000000000 +0900 ++++ term/gpic.trm 2023-08-29 11:12:04.596466000 +0900 @@ -291,6 +291,7 @@ #ifdef TERM_HELP @@ -2962,8 +2962,8 @@ diff -ru term/gpic.trm.ORG term/gpic.trm END_HELP(gpic) #endif /* TERM_HELP */ diff -ru term/grass.trm.ORG term/grass.trm ---- term/grass.trm 2023-05-26.ORG 13:57:54.000000000 +0900 -+++ term/grass.trm 2023-05-29 17:28:05.982956000 +0900 +--- term/grass.trm 2023-08-28.ORG 18:55:39.000000000 +0900 ++++ term/grass.trm 2023-08-29 11:12:04.596540000 +0900 @@ -601,6 +601,7 @@ #ifdef TERM_HELP @@ -2993,8 +2993,8 @@ diff -ru term/grass.trm.ORG term/grass.trm END_HELP(grass) #endif diff -ru term/hp26.trm.ORG term/hp26.trm ---- term/hp26.trm 2023-05-26.ORG 13:57:54.000000000 +0900 -+++ term/hp26.trm 2023-05-29 17:28:05.983041000 +0900 +--- term/hp26.trm 2023-08-28.ORG 18:55:39.000000000 +0900 ++++ term/hp26.trm 2023-08-29 11:12:04.596630000 +0900 @@ -689,6 +689,7 @@ #ifdef TERM_HELP @@ -3021,8 +3021,8 @@ diff -ru term/hp26.trm.ORG term/hp26.trm END_HELP(hp2623a) #endif diff -ru term/hp2648.trm.ORG term/hp2648.trm ---- term/hp2648.trm 2023-05-26.ORG 13:57:54.000000000 +0900 -+++ term/hp2648.trm 2023-05-29 17:28:05.983109000 +0900 +--- term/hp2648.trm 2023-08-28.ORG 18:55:39.000000000 +0900 ++++ term/hp2648.trm 2023-08-29 11:12:04.596704000 +0900 @@ -185,6 +185,7 @@ #ifdef TERM_HELP @@ -3049,8 +3049,8 @@ diff -ru term/hp2648.trm.ORG term/hp2648.trm END_HELP(hp2648) #endif diff -ru term/hp500c.trm.ORG term/hp500c.trm ---- term/hp500c.trm 2023-05-26.ORG 13:57:54.000000000 +0900 -+++ term/hp500c.trm 2023-05-29 17:28:05.983188000 +0900 +--- term/hp500c.trm 2023-08-28.ORG 18:55:39.000000000 +0900 ++++ term/hp500c.trm 2023-08-29 11:12:04.596774000 +0900 @@ -516,6 +516,7 @@ #ifdef TERM_HELP @@ -3087,8 +3087,8 @@ diff -ru term/hp500c.trm.ORG term/hp500c.trm END_HELP(hp500c) #endif /* TERM_HELP */ diff -ru term/hpgeneric.h.ORG term/hpgeneric.h ---- term/hpgeneric.h 2023-05-26.ORG 13:57:54.000000000 +0900 -+++ term/hpgeneric.h 2023-05-29 17:28:05.989691000 +0900 +--- term/hpgeneric.h 2023-08-28.ORG 18:55:39.000000000 +0900 ++++ term/hpgeneric.h 2023-08-29 11:12:04.602677000 +0900 @@ -4,6 +4,7 @@ */ #ifdef TERM_HELP @@ -3118,8 +3118,8 @@ diff -ru term/hpgeneric.h.ORG term/hpgeneric.h END_HELP(hpgeneric) #endif diff -ru term/hpgl.trm.ORG term/hpgl.trm ---- term/hpgl.trm 2023-05-26.ORG 13:57:54.000000000 +0900 -+++ term/hpgl.trm 2023-05-29 17:28:05.983396000 +0900 +--- term/hpgl.trm 2023-08-28.ORG 18:55:39.000000000 +0900 ++++ term/hpgl.trm 2023-08-29 11:12:04.596982000 +0900 @@ -3296,6 +3296,7 @@ #ifdef TERM_HELP @@ -3255,8 +3255,8 @@ diff -ru term/hpgl.trm.ORG term/hpgl.trm END_HELP(pcl5) #endif /* TERM_HELP */ diff -ru term/hpljii.trm.ORG term/hpljii.trm ---- term/hpljii.trm 2023-05-26.ORG 13:57:54.000000000 +0900 -+++ term/hpljii.trm 2023-05-29 17:28:05.983475000 +0900 +--- term/hpljii.trm 2023-08-28.ORG 18:55:39.000000000 +0900 ++++ term/hpljii.trm 2023-08-29 11:12:04.597052000 +0900 @@ -388,6 +388,7 @@ #ifdef TERM_HELP @@ -3301,8 +3301,8 @@ diff -ru term/hpljii.trm.ORG term/hpljii.trm END_HELP(hpljii) #endif /* TERM_HELP */ diff -ru term/hppj.trm.ORG term/hppj.trm ---- term/hppj.trm 2023-05-26.ORG 13:57:54.000000000 +0900 -+++ term/hppj.trm 2023-05-29 17:28:05.983546000 +0900 +--- term/hppj.trm 2023-08-28.ORG 18:55:39.000000000 +0900 ++++ term/hppj.trm 2023-08-29 11:12:04.597116000 +0900 @@ -268,6 +268,7 @@ #ifdef TERM_HELP @@ -3335,8 +3335,8 @@ diff -ru term/hppj.trm.ORG term/hppj.trm END_HELP(hppj) #endif diff -ru term/imagen.trm.ORG term/imagen.trm ---- term/imagen.trm 2023-05-26.ORG 13:57:54.000000000 +0900 -+++ term/imagen.trm 2023-05-29 17:28:05.983636000 +0900 +--- term/imagen.trm 2023-08-28.ORG 18:55:39.000000000 +0900 ++++ term/imagen.trm 2023-08-29 11:12:04.597212000 +0900 @@ -886,6 +886,7 @@ #ifdef TERM_HELP @@ -3377,8 +3377,8 @@ diff -ru term/imagen.trm.ORG term/imagen.trm END_HELP(imagen) #endif diff -ru term/kyo.trm.ORG term/kyo.trm ---- term/kyo.trm 2023-05-26.ORG 13:57:54.000000000 +0900 -+++ term/kyo.trm 2023-05-29 17:28:05.983705000 +0900 +--- term/kyo.trm 2023-08-28.ORG 18:55:39.000000000 +0900 ++++ term/kyo.trm 2023-08-29 11:12:04.597273000 +0900 @@ -201,6 +201,7 @@ #ifdef TERM_HELP @@ -3413,8 +3413,8 @@ diff -ru term/kyo.trm.ORG term/kyo.trm END_HELP(kyo) #endif diff -ru term/latex.trm.ORG term/latex.trm ---- term/latex.trm 2023-05-26.ORG 13:57:54.000000000 +0900 -+++ term/latex.trm 2023-05-29 17:28:05.983831000 +0900 +--- term/latex.trm 2023-08-28.ORG 18:55:39.000000000 +0900 ++++ term/latex.trm 2023-08-29 11:12:04.597389000 +0900 @@ -1164,6 +1164,7 @@ #ifdef TERM_HELP @@ -3505,8 +3505,8 @@ diff -ru term/latex.trm.ORG term/latex.trm END_HELP(latex) #endif /* TERM_TABLE */ diff -ru term/latex_old.h.ORG term/latex_old.h ---- term/latex_old.h 2023-05-26.ORG 13:57:54.000000000 +0900 -+++ term/latex_old.h 2023-05-29 17:28:05.989627000 +0900 +--- term/latex_old.h 2023-08-28.ORG 18:55:39.000000000 +0900 ++++ term/latex_old.h 2023-08-29 11:12:04.602617000 +0900 @@ -5,6 +5,7 @@ */ #ifdef TERM_HELP @@ -3566,8 +3566,8 @@ diff -ru term/latex_old.h.ORG term/latex_old.h END_HELP(latex) #endif diff -ru term/linux-vgagl.trm.ORG term/linux-vgagl.trm ---- term/linux-vgagl.trm 2023-05-26.ORG 13:57:54.000000000 +0900 -+++ term/linux-vgagl.trm 2023-05-29 17:28:05.983893000 +0900 +--- term/linux-vgagl.trm 2023-08-28.ORG 18:55:39.000000000 +0900 ++++ term/linux-vgagl.trm 2023-08-29 11:12:04.597443000 +0900 @@ -1,5 +1,6 @@ #ifdef TERM_HELP START_HELP(linux) @@ -3606,8 +3606,8 @@ diff -ru term/linux-vgagl.trm.ORG term/linux-vgagl.trm END_HELP(linux) #endif diff -ru term/lua.trm.ORG term/lua.trm ---- term/lua.trm 2023-05-26.ORG 13:57:54.000000000 +0900 -+++ term/lua.trm 2023-05-29 17:28:05.984034000 +0900 +--- term/lua.trm 2023-08-28.ORG 18:55:39.000000000 +0900 ++++ term/lua.trm 2023-08-29 11:12:04.597566000 +0900 @@ -1480,6 +1480,7 @@ #ifdef TERM_HELP @@ -3683,8 +3683,8 @@ diff -ru term/lua.trm.ORG term/lua.trm END_HELP(tikz) #endif /* TERM_HELP */ diff -ru term/metafont.trm.ORG term/metafont.trm ---- term/metafont.trm 2023-05-26.ORG 13:57:54.000000000 +0900 -+++ term/metafont.trm 2023-05-29 17:28:05.984128000 +0900 +--- term/metafont.trm 2023-08-28.ORG 18:55:39.000000000 +0900 ++++ term/metafont.trm 2023-08-29 11:12:04.597651000 +0900 @@ -538,6 +538,7 @@ #ifdef TERM_HELP @@ -3799,8 +3799,8 @@ diff -ru term/metafont.trm.ORG term/metafont.trm END_HELP(mf) #endif /* TERM_HELP */ diff -ru term/metapost.trm.ORG term/metapost.trm ---- term/metapost.trm 2023-05-26.ORG 13:57:54.000000000 +0900 -+++ term/metapost.trm 2023-05-29 17:28:05.984264000 +0900 +--- term/metapost.trm 2023-08-28.ORG 18:55:39.000000000 +0900 ++++ term/metapost.trm 2023-08-29 11:12:04.597779000 +0900 @@ -1054,6 +1054,7 @@ #ifdef TERM_HELP @@ -4012,8 +4012,8 @@ diff -ru term/metapost.trm.ORG term/metapost.trm END_HELP(mp) #endif /* TERM_HELP */ diff -ru term/mif.trm.ORG term/mif.trm ---- term/mif.trm 2023-05-26.ORG 13:57:54.000000000 +0900 -+++ term/mif.trm 2023-05-29 17:28:05.984364000 +0900 +--- term/mif.trm 2023-08-28.ORG 18:55:39.000000000 +0900 ++++ term/mif.trm 2023-08-29 11:12:04.597870000 +0900 @@ -963,6 +963,7 @@ #ifdef TERM_HELP @@ -4064,8 +4064,8 @@ diff -ru term/mif.trm.ORG term/mif.trm END_HELP(mif) #endif /* TERM_HELP */ diff -ru term/pbm.trm.ORG term/pbm.trm ---- term/pbm.trm 2023-05-26.ORG 13:57:54.000000000 +0900 -+++ term/pbm.trm 2023-05-29 17:28:05.984444000 +0900 +--- term/pbm.trm 2023-08-28.ORG 18:55:39.000000000 +0900 ++++ term/pbm.trm 2023-08-29 11:12:04.597948000 +0900 @@ -534,6 +534,7 @@ #ifdef TERM_HELP @@ -4115,8 +4115,8 @@ diff -ru term/pbm.trm.ORG term/pbm.trm END_HELP(pbm) #endif /* TERM_HELP */ diff -ru term/pc.trm.ORG term/pc.trm ---- term/pc.trm 2023-05-26.ORG 13:57:54.000000000 +0900 -+++ term/pc.trm 2023-05-29 17:28:05.984576000 +0900 +--- term/pc.trm 2023-08-28.ORG 18:55:39.000000000 +0900 ++++ term/pc.trm 2023-08-29 11:12:04.598070000 +0900 @@ -1587,6 +1587,7 @@ #ifdef TERM_HELP @@ -4170,8 +4170,8 @@ diff -ru term/pc.trm.ORG term/pc.trm END_HELP(dospc) #endif /* TERM_HELP */ diff -ru term/pdf.trm.ORG term/pdf.trm ---- term/pdf.trm 2023-05-26.ORG 13:57:54.000000000 +0900 -+++ term/pdf.trm 2023-05-29 17:28:05.984724000 +0900 +--- term/pdf.trm 2023-08-28.ORG 18:55:39.000000000 +0900 ++++ term/pdf.trm 2023-08-29 11:12:04.598206000 +0900 @@ -1716,6 +1716,7 @@ #ifdef TERM_HELP @@ -4238,8 +4238,8 @@ diff -ru term/pdf.trm.ORG term/pdf.trm END_HELP(pdf) #endif diff -ru term/pict2e.trm.ORG term/pict2e.trm ---- term/pict2e.trm 2023-05-26.ORG 13:57:54.000000000 +0900 -+++ term/pict2e.trm 2023-05-29 17:28:05.984840000 +0900 +--- term/pict2e.trm 2023-08-28.ORG 18:55:39.000000000 +0900 ++++ term/pict2e.trm 2023-08-29 11:12:04.598297000 +0900 @@ -1092,6 +1092,7 @@ #ifdef TERM_HELP @@ -4326,8 +4326,8 @@ diff -ru term/pict2e.trm.ORG term/pict2e.trm END_HELP(pict2e) #endif /* TERM_HELP */ diff -ru term/pm.trm.ORG term/pm.trm ---- term/pm.trm 2023-05-26.ORG 13:57:54.000000000 +0900 -+++ term/pm.trm 2023-05-29 17:28:05.984980000 +0900 +--- term/pm.trm 2023-08-28.ORG 18:55:39.000000000 +0900 ++++ term/pm.trm 2023-08-29 11:12:04.598405000 +0900 @@ -1579,6 +1579,7 @@ #ifdef TERM_HELP @@ -4392,9 +4392,9 @@ diff -ru term/pm.trm.ORG term/pm.trm END_HELP(pm) #endif /* TERM_HELP */ diff -ru term/post.trm.ORG term/post.trm ---- term/post.trm 2023-05-26.ORG 13:57:54.000000000 +0900 -+++ term/post.trm 2023-05-29 17:28:05.992768000 +0900 -@@ -4470,6 +4470,7 @@ +--- term/post.trm 2023-08-28.ORG 18:55:39.000000000 +0900 ++++ term/post.trm 2023-08-29 11:12:04.605545000 +0900 +@@ -4492,6 +4492,7 @@ * of "text" that is necessary to avoid errors. */ START_HELP(00psglobal) @@ -4402,7 +4402,7 @@ diff -ru term/post.trm.ORG term/post.trm #define PS_COMMON_OPTS1 \ " {level1 | leveldefault | level3}",\ " {color | colour | monochrome}",\ -@@ -4537,9 +4538,81 @@ +@@ -4559,9 +4560,81 @@ " plot edges as specified by the `size` option.",\ "", "" @@ -4484,7 +4484,7 @@ diff -ru term/post.trm.ORG term/post.trm "1 epslatex", "?commands set terminal epslatex", "?set terminal epslatex", -@@ -4694,9 +4767,173 @@ +@@ -4716,9 +4789,173 @@ " by the `header` command. Thus, you can use `header` to overwrite some of", " settings performed using \"gnuplot.cfg\"", "" @@ -4658,7 +4658,7 @@ diff -ru term/post.trm.ORG term/post.trm "1 pslatex and pstex", "?commands set terminal pslatex", "?set terminal pslatex", -@@ -4768,9 +5005,82 @@ +@@ -4790,9 +5027,82 @@ "", " Linewidths and pointsizes may be changed with `set style line`." "" @@ -4741,7 +4741,7 @@ diff -ru term/post.trm.ORG term/post.trm "1 postscript", "?commands set terminal postscript", "?set terminal postscript", -@@ -5035,5 +5345,269 @@ +@@ -5057,5 +5367,269 @@ " other fonts you may have to try both settings. See also `fontfile`.", "", "" @@ -5012,8 +5012,8 @@ diff -ru term/post.trm.ORG term/post.trm END_HELP(post) #endif /* TERM_HELP */ diff -ru term/pstricks.trm.ORG term/pstricks.trm ---- term/pstricks.trm 2023-05-26.ORG 13:57:54.000000000 +0900 -+++ term/pstricks.trm 2023-05-29 17:28:05.985667000 +0900 +--- term/pstricks.trm 2023-08-28.ORG 18:55:39.000000000 +0900 ++++ term/pstricks.trm 2023-08-29 11:12:04.598949000 +0900 @@ -1323,6 +1323,7 @@ #ifdef TERM_HELP @@ -5092,8 +5092,8 @@ diff -ru term/pstricks.trm.ORG term/pstricks.trm END_HELP(pstricks) #endif /* TERM_HELP */ diff -ru term/qms.trm.ORG term/qms.trm ---- term/qms.trm 2023-05-26.ORG 13:57:54.000000000 +0900 -+++ term/qms.trm 2023-05-29 17:28:05.985737000 +0900 +--- term/qms.trm 2023-08-28.ORG 18:55:39.000000000 +0900 ++++ term/qms.trm 2023-08-29 11:12:04.599009000 +0900 @@ -223,6 +223,7 @@ #ifdef TERM_HELP @@ -5120,8 +5120,8 @@ diff -ru term/qms.trm.ORG term/qms.trm END_HELP(qms) #endif diff -ru term/qt.trm.ORG term/qt.trm ---- term/qt.trm 2023-05-26.ORG 13:57:54.000000000 +0900 -+++ term/qt.trm 2023-05-29 17:28:05.985822000 +0900 +--- term/qt.trm 2023-08-28.ORG 18:55:39.000000000 +0900 ++++ term/qt.trm 2023-08-29 11:12:04.599078000 +0900 @@ -76,6 +76,7 @@ #ifdef TERM_HELP @@ -5258,8 +5258,8 @@ diff -ru term/qt.trm.ORG term/qt.trm END_HELP(qt) #endif /* TERM_HELP */ diff -ru term/regis.trm.ORG term/regis.trm ---- term/regis.trm 2023-05-26.ORG 13:57:54.000000000 +0900 -+++ term/regis.trm 2023-05-29 17:28:05.985891000 +0900 +--- term/regis.trm 2023-08-28.ORG 18:55:39.000000000 +0900 ++++ term/regis.trm 2023-08-29 11:12:04.599138000 +0900 @@ -255,6 +255,7 @@ #ifdef TERM_HELP @@ -5291,9 +5291,9 @@ diff -ru term/regis.trm.ORG term/regis.trm END_HELP(regis) #endif diff -ru term/svg.trm.ORG term/svg.trm ---- term/svg.trm 2023-05-26.ORG 13:57:54.000000000 +0900 -+++ term/svg.trm 2023-05-29 17:28:05.986081000 +0900 -@@ -2317,6 +2317,7 @@ +--- term/svg.trm 2023-08-28.ORG 18:55:39.000000000 +0900 ++++ term/svg.trm 2023-08-29 11:12:04.599310000 +0900 +@@ -2323,6 +2323,7 @@ #ifdef TERM_HELP START_HELP(svg) @@ -5301,7 +5301,7 @@ diff -ru term/svg.trm.ORG term/svg.trm "1 svg", "?commands set terminal svg", "?set terminal svg", -@@ -2364,9 +2365,62 @@ +@@ -2370,9 +2371,62 @@ " then a unique name is required to avoid potential conflicting references", " to other SVG plots. Use the `name` option to ensure uniqueness.", "" @@ -5364,7 +5364,7 @@ diff -ru term/svg.trm.ORG term/svg.trm "1 domterm", "?set terminal domterm", "?terminal domterm", -@@ -2397,5 +2451,37 @@ +@@ -2403,5 +2457,37 @@ " the start of every plot so that successive plots overwrite the same area on", " the screen. This may be desirable in order to create an in-place animation.", "" @@ -5403,8 +5403,8 @@ diff -ru term/svg.trm.ORG term/svg.trm END_HELP(domterm) #endif /* TERM_HELP */ diff -ru term/t410x.trm.ORG term/t410x.trm ---- term/t410x.trm 2023-05-26.ORG 13:57:54.000000000 +0900 -+++ term/t410x.trm 2023-05-29 17:28:05.986153000 +0900 +--- term/t410x.trm 2023-08-28.ORG 18:55:39.000000000 +0900 ++++ term/t410x.trm 2023-08-29 11:12:04.599374000 +0900 @@ -312,6 +312,7 @@ #ifdef TERM_HELP @@ -5431,8 +5431,8 @@ diff -ru term/t410x.trm.ORG term/t410x.trm END_HELP(tek410x) #endif diff -ru term/tek.trm.ORG term/tek.trm ---- term/tek.trm 2023-05-26.ORG 13:57:54.000000000 +0900 -+++ term/tek.trm 2023-05-29 17:28:05.986290000 +0900 +--- term/tek.trm 2023-08-28.ORG 18:55:39.000000000 +0900 ++++ term/tek.trm 2023-08-29 11:12:04.599492000 +0900 @@ -1437,6 +1437,7 @@ #ifdef TERM_HELP @@ -5536,8 +5536,8 @@ diff -ru term/tek.trm.ORG term/tek.trm END_HELP(tek40) #endif /* TERM_HELP */ diff -ru term/texdraw.trm.ORG term/texdraw.trm ---- term/texdraw.trm 2023-05-26.ORG 13:57:54.000000000 +0900 -+++ term/texdraw.trm 2023-05-29 17:28:05.986390000 +0900 +--- term/texdraw.trm 2023-08-28.ORG 18:55:39.000000000 +0900 ++++ term/texdraw.trm 2023-08-29 11:12:04.599583000 +0900 @@ -883,6 +883,7 @@ #ifdef TERM_HELP @@ -5606,8 +5606,8 @@ diff -ru term/texdraw.trm.ORG term/texdraw.trm END_HELP(texdraw) #endif /* TERM_HELP */ diff -ru term/tgif.trm.ORG term/tgif.trm ---- term/tgif.trm 2023-05-26.ORG 13:57:54.000000000 +0900 -+++ term/tgif.trm 2023-05-29 17:28:05.995258000 +0900 +--- term/tgif.trm 2023-08-28.ORG 18:55:39.000000000 +0900 ++++ term/tgif.trm 2023-08-29 11:12:04.608025000 +0900 @@ -1678,6 +1678,7 @@ #ifdef TERM_HELP @@ -5697,8 +5697,8 @@ diff -ru term/tgif.trm.ORG term/tgif.trm #endif /*{{{}}}*/ diff -ru term/tkcanvas.trm.ORG term/tkcanvas.trm ---- term/tkcanvas.trm 2023-05-26.ORG 13:57:54.000000000 +0900 -+++ term/tkcanvas.trm 2023-05-29 17:28:05.986713000 +0900 +--- term/tkcanvas.trm 2023-08-28.ORG 18:55:39.000000000 +0900 ++++ term/tkcanvas.trm 2023-08-29 11:12:04.599872000 +0900 @@ -2116,6 +2116,7 @@ #ifdef TERM_HELP @@ -5861,8 +5861,8 @@ diff -ru term/tkcanvas.trm.ORG term/tkcanvas.trm #endif diff -ru term/tpic.trm.ORG term/tpic.trm ---- term/tpic.trm 2023-05-26.ORG 13:57:54.000000000 +0900 -+++ term/tpic.trm 2023-05-29 17:28:05.986812000 +0900 +--- term/tpic.trm 2023-08-28.ORG 18:55:39.000000000 +0900 ++++ term/tpic.trm 2023-08-29 11:12:04.599967000 +0900 @@ -926,6 +926,7 @@ #ifdef TERM_HELP @@ -5923,8 +5923,8 @@ diff -ru term/tpic.trm.ORG term/tpic.trm END_HELP(tpic) #endif /* TERM_TABLE */ diff -ru term/webp.trm.ORG term/webp.trm ---- term/webp.trm 2023-05-26.ORG 13:57:54.000000000 +0900 -+++ term/webp.trm 2023-05-29 17:28:05.986897000 +0900 +--- term/webp.trm 2023-08-28.ORG 18:55:39.000000000 +0900 ++++ term/webp.trm 2023-08-29 11:12:04.600041000 +0900 @@ -372,6 +372,7 @@ #ifdef TERM_HELP @@ -5987,8 +5987,8 @@ diff -ru term/webp.trm.ORG term/webp.trm #endif /* TERM_HELP */ diff -ru term/win.trm.ORG term/win.trm ---- term/win.trm 2023-05-26.ORG 13:57:54.000000000 +0900 -+++ term/win.trm 2023-05-29 17:28:05.987055000 +0900 +--- term/win.trm 2023-08-28.ORG 18:55:39.000000000 +0900 ++++ term/win.trm 2023-08-29 11:12:04.600184000 +0900 @@ -1190,6 +1190,7 @@ #ifdef TERM_HELP @@ -6326,8 +6326,8 @@ diff -ru term/win.trm.ORG term/win.trm END_HELP(windows) #endif /* TERM_HELP */ diff -ru term/wxt.trm.ORG term/wxt.trm ---- term/wxt.trm 2023-05-26.ORG 13:57:54.000000000 +0900 -+++ term/wxt.trm 2023-05-29 17:28:05.987154000 +0900 +--- term/wxt.trm 2023-08-28.ORG 18:55:39.000000000 +0900 ++++ term/wxt.trm 2023-08-29 11:12:04.600275000 +0900 @@ -499,6 +499,7 @@ #ifdef TERM_HELP @@ -6468,9 +6468,9 @@ diff -ru term/wxt.trm.ORG term/wxt.trm END_HELP(wxt) #endif /* TERM_HELP */ diff -ru term/x11.trm.ORG term/x11.trm ---- term/x11.trm 2023-05-26.ORG 13:57:54.000000000 +0900 -+++ term/x11.trm 2023-05-29 17:28:05.987396000 +0900 -@@ -2389,6 +2389,7 @@ +--- term/x11.trm 2023-08-28.ORG 18:55:39.000000000 +0900 ++++ term/x11.trm 2023-08-29 11:12:04.600491000 +0900 +@@ -2403,6 +2403,7 @@ #ifdef TERM_HELP START_HELP(x11) @@ -6478,7 +6478,7 @@ diff -ru term/x11.trm.ORG term/x11.trm "1 x11", "?commands set terminal x11", "?set terminal x11", -@@ -2894,6 +2895,515 @@ +@@ -2908,6 +2909,515 @@ "%@gnuplot*fastrotate: on", "%@gnuplot*ctrlq: off", "@end table" @@ -6995,8 +6995,8 @@ diff -ru term/x11.trm.ORG term/x11.trm END_HELP(x11) #endif /* TERM_HELP */ diff -ru term/xlib.trm.ORG term/xlib.trm ---- term/xlib.trm 2023-05-26.ORG 13:57:54.000000000 +0900 -+++ term/xlib.trm 2023-05-29 17:28:05.987459000 +0900 +--- term/xlib.trm 2023-08-28.ORG 18:55:39.000000000 +0900 ++++ term/xlib.trm 2023-08-29 11:12:04.600546000 +0900 @@ -96,6 +96,7 @@ #ifdef TERM_HELP diff --git a/docs/titlepag.tex b/docs/titlepag.tex index 64dc9b969..702d7f5de 100644 --- a/docs/titlepag.tex +++ b/docs/titlepag.tex @@ -96,8 +96,8 @@ % Every verbatim environment is surrounded by these commands. % For 11pt/12pt options change '\normalsize' to '\small' % or '\footnotesize' in the preverbatim definition -\newcommand{\preverbatim}{\footnotesize\vspace{-2.2ex}} -\newcommand{\postverbatim}{\normalsize\vspace{-0.5ex}} +\newcommand{\preverbatim}{\par\footnotesize\vspace{-3ex}} +\newcommand{\postverbatim}{\vspace{-1.5ex}\par\normalsize} % apply settings for toc_entr.sty \adjustarticle diff --git a/docs/webp_figures.gnu b/docs/webp_figures.gnu index def8aacc5..2379707e9 100644 --- a/docs/webp_figures.gnu +++ b/docs/webp_figures.gnu @@ -57,5 +57,19 @@ splot $HULL using 1:2:(0) with mask, \ 'mask_pm3d.dat' using 1:2:3 mask with pm3d unset multiplot + +# same thing as a png image for fallback if browser does not support webp +set term png font "Calisto MT,12" size 600,400 +set output './html/figure_mask.png' +set multiplot layout 1,2 spacing 0.0 margins 0.05,0.95,0.0,0.85 +set title "Cluster of points\n defining the mask region" +splot 'mask_pm3d.dat' using 1:2:3 with pm3d, \ + 'mask_pm3d.dat' using 1:2:(0) nogrid with points pt 7 ps .5 lc "black" +set pm3d interp 3,3 +set title "pm3d surface masked by\nconvex hull of the cluster" +splot $HULL using 1:2:(0) with mask, \ + 'mask_pm3d.dat' using 1:2:3 mask with pm3d +unset multiplot + reset diff --git a/src/axis.c b/src/axis.c index b1c9d6f3d..5224bfc52 100644 --- a/src/axis.c +++ b/src/axis.c @@ -2976,8 +2976,6 @@ autoscale_one_point(struct axis *axis, double x) } } -#ifdef USE_POLAR_GRID - /* * read one of the limiting values in a range of the form: * [min:max] [*:*] [*:max] [min:*] @@ -2998,6 +2996,4 @@ parse_one_range_limit( double default_value ) return limit; } - -#endif /* USE_POLAR_GRID */ diff --git a/src/boundary.c b/src/boundary.c index dd40b0271..7145bdc5b 100644 --- a/src/boundary.c +++ b/src/boundary.c @@ -1313,7 +1313,10 @@ do_key_sample( if (need_fill_border(fs)) { do_sector(xl + key_point_offset, yl-key_sample_height, (3)*key_sample_height/4.0, (3+2)*key_sample_height/4.0, 120.0*DEG2RAD, 60.0*DEG2RAD, 1.0, 0, FALSE); } - + } else if ((this_plot->plot_style == HSTEPS || this_plot->plot_style == HISTEPS) + && (style == FS_EMPTY || (! this_plot->hsteps_options.baseline)) + && w > 0) { + draw_clip_line(xl + key_sample_left, yl, xl + key_sample_right, yl); } else if (w > 0) { /* All other plot types with fill */ if (style != FS_EMPTY) (*t->fillbox)(style,x,y,w,h); diff --git a/src/datablock.c b/src/datablock.c index 1722c1ddf..73245e457 100644 --- a/src/datablock.c +++ b/src/datablock.c @@ -134,6 +134,9 @@ new_block( enum DATA_TYPES type ) if (!isletter(c_token+1)) int_error(c_token, "illegal block name"); + if (!equals(num_tokens-2, "<<") || !isletter(num_tokens-1)) + int_error(c_token, "block definition line must end with << EODmarker"); + /* Create or recycle a datablock with the requested name */ name = parse_datablock_name(); datablock = add_udv_by_name(name); @@ -157,16 +160,15 @@ new_block( enum DATA_TYPES type ) int_error(c_token, "expecting ')'"); c_token++; } - } else { - /* Must be a datablock */ + } else { /* Must be a datablock */ datablock->udv_value.type = DATABLOCK; datablock->udv_value.v.data_array = NULL; } - if (!equals(c_token, "<<") || !isletter(c_token+1)) - int_error(c_token, "block definition line must end with << EODmarker"); + if (c_token != num_tokens-2) + int_error(c_token, "garbage preceding << EODmarker"); c_token++; - eod = (char *) gp_alloc(token[c_token].length +2, "datablock"); + eod = (char *) gp_alloc(token[c_token].length + 2, "datablock"); copy_str(&eod[0], c_token, token[c_token].length + 2); c_token++; diff --git a/src/datafile.c b/src/datafile.c index cd8edd4c6..2fc53de10 100644 --- a/src/datafile.c +++ b/src/datafile.c @@ -1142,27 +1142,6 @@ df_open(const char *cmd_filename, int max_using, struct curve_points *plot) /* Perhaps it should be a parameter to df_readline? */ df_current_plot = plot; - /* If either 'set datafile columnhead' or 'set key autotitle columnhead' - * is in effect we always treat the * first data row as non-data - * (df_readline() will return DF_COLUMN_HEADERS rather than the column count). - * This is true even if the key is off or the data is read from 'stats' - * or from 'fit' rather than plot. - */ - column_for_key_title = NO_COLUMN_HEADER; - df_already_got_headers = FALSE; - if ((&keyT)->auto_titles == COLUMNHEAD_KEYTITLES) - parse_1st_row_as_headers = TRUE; - else if (df_columnheaders) - parse_1st_row_as_headers = TRUE; - else - parse_1st_row_as_headers = FALSE; - /* Pseudofiles '+' and '++' can never have column headers */ - if (df_pseudodata > 0) - parse_1st_row_as_headers = FALSE; - /* Data pulled from an array also cannot have column headers */ - if (df_array) - parse_1st_row_as_headers = FALSE; - if (!cmd_filename) int_error(c_token, "missing filename"); if (!cmd_filename[0]) { @@ -1182,9 +1161,27 @@ df_open(const char *cmd_filename, int max_using, struct curve_points *plot) df_filename = gp_strdup(cmd_filename); } - /* defer opening until we have parsed the modifiers... */ + /* If either 'set datafile columnhead' or 'set key autotitle columnhead' + * is in effect we always treat the * first data row as non-data + * (df_readline() will return DF_COLUMN_HEADERS rather than the column count). + * This is true even if the key is off or the data is read from 'stats' + * or from 'fit' rather than plot. + */ + column_for_key_title = NO_COLUMN_HEADER; + df_already_got_headers = FALSE; + if ((&keyT)->auto_titles == COLUMNHEAD_KEYTITLES) + parse_1st_row_as_headers = TRUE; + else if (df_columnheaders) + parse_1st_row_as_headers = TRUE; + else + parse_1st_row_as_headers = FALSE; + /* arrays or internally generated data ('+' or '++') never have column headers */ + if (df_array || (df_filename[0] == '+')) + parse_1st_row_as_headers = FALSE; - /* pm 25.11.2001 allow any order of options */ + /* + * Defer opening the input file until we have parsed the modifiers + */ while (!END_OF_COMMAND) { /* look for binary / matrix */ @@ -3502,6 +3499,7 @@ df_bin_default_columns default_style_cols[] = { {FSTEPS, 1, 1}, {FILLSTEPS, 1, 1}, {HISTEPS, 1, 1}, + {HSTEPS, 1, 1}, {VECTOR, 2, 2}, {CANDLESTICKS, 4, 1}, {FINANCEBARS, 4, 1}, diff --git a/src/gadgets.c b/src/gadgets.c index 697111114..fe6d6dab7 100644 --- a/src/gadgets.c +++ b/src/gadgets.c @@ -555,16 +555,22 @@ vertex_is_inside(gpiPoint test_vertex, gpiPoint *clip_boundary) void intersect_polyedge_with_boundary(gpiPoint first, gpiPoint second, gpiPoint *intersect, gpiPoint *clip_boundary) { - /* this routine is called only if one point is outside and the other - is inside, which implies that clipping is needed at a horizontal - boundary, that second.y is different from first.y and no division - by zero occurs. Same for vertical boundary and x coordinates. */ + /* This routine is called only if one point is outside and the other + * is inside, which implies that clipping is needed at a horizontal + * boundary, that second.y is different from first.y and no division + * by zero occurs. Same for vertical boundary and x coordinates. + * Conversion to double is needed to prevent integer overflow. + */ + double dx = (second.x - first.x); + double dy = (second.y - first.y); if (clip_boundary[0].y == clip_boundary[1].y) { /* horizontal */ (*intersect).y = clip_boundary[0].y; - (*intersect).x = first.x + (clip_boundary[0].y - first.y) * (second.x - first.x)/(second.y - first.y); + (*intersect).x = first.x + + (double)(clip_boundary[0].y - first.y) * dx/dy; } else { /* vertical */ (*intersect).x = clip_boundary[0].x; - (*intersect).y = first.y + (clip_boundary[0].x - first.x) * (second.y - first.y)/(second.x - first.x); + (*intersect).y = first.y + + (double)(clip_boundary[0].x - first.x) * dy/dx; } } diff --git a/src/gadgets.h b/src/gadgets.h index 6db90d77b..4635d087c 100644 --- a/src/gadgets.h +++ b/src/gadgets.h @@ -330,6 +330,15 @@ typedef struct textbox_style { } textbox_style; #define DEFAULT_TEXTBOX_STYLE { FALSE, FALSE, 1.0, 1.0, 1.0, BLACK_COLORSPEC, BACKGROUND_COLORSPEC } +typedef struct hsteps_options { + double offset; + int direction; + TBOOLEAN baseline; + TBOOLEAN link; + TBOOLEAN split; +} hsteps_opts; +#define DEFAULT_HSTEPS_OPTS { 0, HSTEPS_DIR_BOTHSIDES, TRUE, TRUE, FALSE } + /* * Used by dgrid3d in 3D gridding * and polar_grid in 2D polar gridding diff --git a/src/gp_types.h b/src/gp_types.h index 515f8649a..c7183f8bd 100644 --- a/src/gp_types.h +++ b/src/gp_types.h @@ -100,7 +100,7 @@ typedef enum PLOT_STYLE { STEPS = 11*PLOT_STYLE_BITS + PLOT_STYLE_HAS_LINE, FILLSTEPS = 11*PLOT_STYLE_BITS + PLOT_STYLE_HAS_FILL, FSTEPS = 12*PLOT_STYLE_BITS + PLOT_STYLE_HAS_LINE, - HISTEPS = 13*PLOT_STYLE_BITS + PLOT_STYLE_HAS_LINE, + HISTEPS = 13*PLOT_STYLE_BITS + PLOT_STYLE_HAS_LINE + PLOT_STYLE_HAS_FILL, VECTOR = 14*PLOT_STYLE_BITS + PLOT_STYLE_HAS_LINE + PLOT_STYLE_HAS_VECTOR, CANDLESTICKS = 15*PLOT_STYLE_BITS + (PLOT_STYLE_HAS_ERRORBAR | PLOT_STYLE_HAS_FILL), FINANCEBARS = 16*PLOT_STYLE_BITS + PLOT_STYLE_HAS_LINE, @@ -128,6 +128,7 @@ typedef enum PLOT_STYLE { POLYGONMASK = 39*PLOT_STYLE_BITS, SECTORS = 40*PLOT_STYLE_BITS + PLOT_STYLE_HAS_LINE + PLOT_STYLE_HAS_FILL, CONTOURFILL = 41*PLOT_STYLE_BITS + PLOT_STYLE_HAS_FILL, + HSTEPS = 42*PLOT_STYLE_BITS + PLOT_STYLE_HAS_FILL, PLOT_STYLE_NONE = -1 } PLOT_STYLE; diff --git a/src/graph3d.c b/src/graph3d.c index 569644d88..9ab5a655b 100644 --- a/src/graph3d.c +++ b/src/graph3d.c @@ -1202,6 +1202,7 @@ do_3dplot( case FILLSTEPS: case FSTEPS: case HISTEPS: + case HSTEPS: case SURFACEGRID: case LINES: if (draw_this_surface) { @@ -1365,6 +1366,7 @@ do_3dplot( case FILLSTEPS: case FSTEPS: case HISTEPS: + case HSTEPS: case SURFACEGRID: case LINES: /* Normal case (surface) */ @@ -4341,7 +4343,7 @@ zslice_callback( if (!inrange(place,zmin,zmax)) return; - if (ticlevel != contourfill.tic_level) + if (ticlevel != contourfill.tic_level) /* Currently always 0 */ return; if (current_slice >= MAX_ZSLICES) return; diff --git a/src/graph3d.h b/src/graph3d.h index fd5d79885..1032727a1 100644 --- a/src/graph3d.h +++ b/src/graph3d.h @@ -72,7 +72,7 @@ typedef enum cfill_mode { typedef struct contourfill { t_cfill_mode mode; int nslices; - int tic_level; + int tic_level; /* Currently always 0 */ int firstlinetype; } t_contourfill; #define MAX_ZSLICES 100 diff --git a/src/graphics.c b/src/graphics.c index 93a7a365e..c4d7eb3bf 100644 --- a/src/graphics.c +++ b/src/graphics.c @@ -121,9 +121,14 @@ static void place_parallel_axes(struct curve_points *plots, int layer); static void place_spiderplot_axes(struct curve_points *plots, int layer); static void plot_polar_grid(struct curve_points *plot); +#if (0) /* STEPS FILLSTEPS FSTEPS HISTEPS now emulated by HSTEPS */ static void plot_steps(struct curve_points * plot); /* JG */ static void plot_fsteps(struct curve_points * plot); /* HOE */ static void plot_histeps(struct curve_points * plot); /* CAC */ +static int histeps_compare(SORTFUNC_ARGS p1, SORTFUNC_ARGS p2); +#endif /* STEPS FILLSTEPS FSTEPS HISTEPS now emulated by HSTEPS */ + +static void plot_hsteps(struct curve_points * plot); static void ytick2d_callback(struct axis *, double place, char *text, int ticlevel, struct lp_style_type grid, struct ticmark *userlabels); static void xtick2d_callback(struct axis *, double place, char *text, int ticlevel, struct lp_style_type grid, struct ticmark *userlabels); @@ -131,8 +136,6 @@ static void ttick_callback(struct axis *, double place, char *text, int ticlevel static void spidertick_callback(struct axis *, double place, char *text, int ticlevel, struct lp_style_type grid, struct ticmark *userlabels); -static int histeps_compare(SORTFUNC_ARGS p1, SORTFUNC_ARGS p2); - static void get_arrow(struct arrow_def* arrow, double* sx, double* sy, double* ex, double* ey); static void map_position_double(struct position* pos, double* x, double* y, const char* what); @@ -881,13 +884,19 @@ do_plot(struct curve_points *plots, int pcount) break; case STEPS: case FILLSTEPS: - plot_steps(this_plot); +/* plot_steps(this_plot);*/ + plot_hsteps(this_plot); break; case FSTEPS: - plot_fsteps(this_plot); +/* plot_fsteps(this_plot); */ + plot_hsteps(this_plot); break; case HISTEPS: - plot_histeps(this_plot); +/* plot_histeps(this_plot); */ + plot_hsteps(this_plot); + break; + case HSTEPS: + plot_hsteps(this_plot); break; case POINTSTYLE: plot_points(this_plot); @@ -1711,6 +1720,7 @@ plot_betweencurves(struct curve_points *plot) } } +#if (0) /* STEPS FILLSTEPS FSTEPS HISTEPS now emulated by HSTEPS */ /* plot_steps: * Plot the curves in STEPS or FILLSTEPS style @@ -1934,6 +1944,350 @@ plot_histeps(struct curve_points *plot) free(gl); } +#endif /* STEPS FILLSTEPS FSTEPS HISTEPS now emulated by HSTEPS */ + +/* plot_hsteps: + * Plot the curves in HSTEPS style + * Also handles emulation of older plot styles STEPS FSTEPS FILLSTEPS HISTEPS + */ + +#define HSTEPS_POINT_VALID 1 +#define HSTEPS_POINT_NAN 0 +#define HSTEPS_POINT_UNDEFINED -1 +#define HSTEPS_GAP_POINT (1<<0) +#define HSTEPS_GAP_COLOR (1<<1) +#define interpolate_xl(p, k, a) ((a)*p[k-1].x + (1.0-(a))*p[k].x) /* for k >= 1 */ +#define interpolate_xr(p, k, a) ((a)*p[k].x + (1.0-(a))*p[k+1].x) /* for k <= np -2 */ +#define extrapolate_xl(p, k, a) ((1.0+(a))*p[k].x - (a)*p[k+1].x) /* for k >= np -2 */ +#define extrapolate_xr(p, k, a) ((1.0+(1.0-a))*p[k].x - (1.0-a)*p[k-1].x) /* for k >= 1 */ + +static void +plot_hsteps (struct curve_points *plot) +{ + int i, k; /* misc counters */ + double xl, xr, yc; /* temporary coordinate variables */ + int count = 0; + int goodcount = 0; + double anchor; /* data point position in horizontal segment */ + double y_null, ymax, ymin; /* y coordinate of baseline, maximum, minimum */ + int ybase = 0; /* y coordinate of baseline in terminal coordinates */ + int np = plot->p_count; /* number of points */ + coordinate *points = plot->points; /* point data (coordinate) */ + double *varcolor = plot->varcolor; /* point data (varcolor) */ + int *state = NULL; /* point data (state) */ + int *gap = NULL; /* point data (gap) */ + int direction = plot->hsteps_options.direction; /* hsteps direction */ + double offset = plot->hsteps_options.offset; /* y-axis offset */ + TBOOLEAN has_baseline = plot->hsteps_options.baseline; /* flag for existence of baseline */ + TBOOLEAN has_link = plot->hsteps_options.link; /* flag for existence of link */ + TBOOLEAN opt_split = plot->hsteps_options.split; /* flag for splitting */ + TBOOLEAN opt_above = (plot->filledcurves_options.oneside > 0) ? TRUE : FALSE; + TBOOLEAN opt_below = (plot->filledcurves_options.oneside < 0) ? TRUE : FALSE; + int fill_style = 0; /* fill style */ + TBOOLEAN has_border = FALSE; + gpiPoint *nodes = NULL; /* node data of polygon */ + gpiPoint *fillarea = NULL; /* fillarea data of polygon */ + int in; /* number of nodes on fillarea */ + BoundingBox *clip_save = clip_area; + + /*********************************************************/ + /* Setting for drawing */ + /*********************************************************/ + + /* Setting: canvas range */ + ymin = ( Y_AXIS.min < Y_AXIS.max ) ? Y_AXIS.min : Y_AXIS.max; + ymax = ( Y_AXIS.min < Y_AXIS.max ) ? Y_AXIS.max : Y_AXIS.min; + + /* Setting: direction */ + anchor = ( direction == HSTEPS_DIR_FORWARD ) ? 0 : /* forward */ + ( direction == HSTEPS_DIR_BACKWARD ) ? 1 : /* backward */ + 0.5; /* default (bothsides) */ + + /* Setting: baseline (y_null, ybase) */ + if (plot->filledcurves_options.closeto == FILLEDCURVES_ATY1) + y_null = plot->filledcurves_options.at + offset; + else if (Y_AXIS.log) /* log y axis must treat 0.0 as -infinity */ + y_null = Y_AXIS.min; + else + y_null = offset; /* default baseline (y=0) */ + + if (has_baseline) + cliptorange(y_null, ymin, ymax); + + ybase = map_y(y_null); + + /* Setting fill_style */ + fill_style = (has_baseline) ? style_from_fill(&plot->fill_properties) : FS_EMPTY; + + /* + * Prepare data for drawing + */ + + /* Allocating 'state' and 'gap' array */ + state = gp_alloc(np * sizeof(int), "hsteps data point state"); + gap = gp_alloc(np * sizeof(int), "hsteps data gap"); + + /* Initializing 'state' and 'gap' array */ + for (i=0; i y_null))) { + state[i] = HSTEPS_POINT_NAN; + count = 0; + } else { /* well-defined point */ + state[i] = HSTEPS_POINT_VALID; + count++; + } + + goodcount = (count > goodcount) ? count : goodcount; + } + + /* Checking number of good points */ + if (goodcount < 1 + || (np == 1 && points[0].z < 0)) { + free(state); + free(gap); + return; + } + + /* Setting xlow/xhigh member of 'points' array according to anchor value */ + /* For variable width (3rd column), xlow/xhigh is already set in plot2d.c:get_data() */ + for (i=0; i= 0.0) + continue; + /* anchor */ + /* 0 : xl = x - 0.0*w, xr = x + 1.0*w */ + /* 0.5 : xl = x - 0.5*w, xr = x + 0.5*w */ + /* 1 : xl = x - 1.0*w, xr = x + 0.0*w */ + if (i == 0) { + points[i].xlow = extrapolate_xl(points, i, anchor); + points[i].xhigh = interpolate_xr(points, i, anchor); + } else if (i == np - 1) { + points[i].xlow = interpolate_xl(points, i, anchor); + points[i].xhigh = extrapolate_xr(points, i, anchor); + } else { + points[i].xlow = interpolate_xl(points, i, anchor); + points[i].xhigh = interpolate_xr(points, i, anchor); + } + } + + /* Checking derived undefined points and treating extrapolation around undefined points */ + + /* first point: UNDEFINED if next point is UNDEFINED */ + if (points[0].z < 0.0 && state[1] == HSTEPS_POINT_UNDEFINED) + state[0] = HSTEPS_POINT_UNDEFINED; + + for (i=1; i= 0) /* skip if variable width */ + continue; + + if (state[i] == HSTEPS_POINT_UNDEFINED) /* skip if UNDEFINED */ + continue; + + if (state[i-1] == HSTEPS_POINT_UNDEFINED + && state[i+1] == HSTEPS_POINT_UNDEFINED) { /* UNDEFINED if both sides are UNDEFINED */ + state[i] = HSTEPS_POINT_UNDEFINED; + continue; + } + + if (state[i-1] == HSTEPS_POINT_UNDEFINED) /* recalculate xlow if previous point is UNDEFINED */ + points[i].xlow = extrapolate_xl(points, i, anchor); + else if (state[i+1] == HSTEPS_POINT_UNDEFINED) /* recalculate xhigh if next point is UNDEFINED */ + points[i].xhigh = extrapolate_xr(points, i, anchor); + } + + /* last point: UNDEFINED if previous point is UNDEFINED */ + if (points[np-1].z < 0.0 && state[np-2] == HSTEPS_POINT_UNDEFINED) + state[np-1] = HSTEPS_POINT_UNDEFINED; + + /* Emulation of steps/fsteps/fillsteps */ + + if (plot->plot_style == STEPS || plot->plot_style == FILLSTEPS) { + points[np-1].xhigh = points[np-1].xlow; + for (i=1; iplot_style == FSTEPS) { + points[0].xlow = points[0].xhigh; + for (i=1; iplot_style == FILLSTEPS) + fill_style = style_from_fill(&plot->fill_properties); + + /* Checking gaps between points */ + for (i=0; ifilled_polygon && fill_style != FS_EMPTY) { + + clip_save = clip_area; + clip_area = &plot_bounds; + + term_apply_lp_properties(&plot->lp_properties); + + k = 0; + for (i=0; i= 0 && (gap[i-1] & HSTEPS_GAP_POINT)) { + nodes[2*k+1].x = nodes[2*k].x; /* bottom line in pulse */ + nodes[2*k+1].y = ybase; + nodes[2*k+2].x = xl; + nodes[2*k+2].y = ybase; + k += 1; + } + nodes[2*k+1].x = xl; /* hline + connectors */ + nodes[2*k+1].y = yc; + nodes[2*k+2].x = xr; + nodes[2*k+2].y = yc; + k += 1; + } + + /* Rendering filled polygon */ + if (i == np - 1 /* last point */ + || gap[i] /* has point or color gap */ + || state[i] != HSTEPS_POINT_VALID) { /* not valid point */ + if (k > 0) { + nodes[2*k+1].x = nodes[2*k].x; + nodes[2*k+1].y = ybase; + nodes[2*k+2].x = nodes[0].x; + nodes[2*k+2].y = nodes[0].y; + clip_polygon(nodes, fillarea, 2*k+3, &in); + if (in > 0) { + fillarea[0].style = fill_style; + (term->filled_polygon)(in, fillarea); + } + } + + /* Resetting construction of polygon */ + k = 0; + } + } + clip_area = clip_save; + } + + /*********************************************************/ + /* Drawing line or border */ + /*********************************************************/ + if (fill_style != FS_EMPTY) { + if (plot->plot_style == FILLSTEPS) + has_border = FALSE; + else + has_border = need_fill_border(&plot->fill_properties); + } + + if (!has_border) + term_apply_lp_properties(&plot->lp_properties); + + if (fill_style == FS_EMPTY || has_border) { + + k = 0; + for (i=0; ifill_properties); + } else if (has_baseline && has_link && (gap[i-1] & HSTEPS_GAP_POINT)) { + nodes[2*k+1].x = nodes[2*k].x; /* bottom line in pulse */ + nodes[2*k+1].y = ybase; + nodes[2*k+2].x = xl; + nodes[2*k+2].y = ybase; + k += 1; + } + nodes[2*k+1].x = xl; /* hline + connectors */ + nodes[2*k+1].y = yc; + nodes[2*k+2].x = xr; + nodes[2*k+2].y = yc; + k += 1; + } + + /* Rendering polygon */ + if (i == np - 1 /* last point */ + || !has_link /* nolink */ + || opt_split /* split */ + || state[i] != HSTEPS_POINT_VALID) { /* not valid point */ + if (k > 0) { + nodes[2*k+1].x = nodes[2*k].x; + nodes[2*k+1].y = (has_baseline) ? ybase : nodes[2*k].y; + + /* drawing ENVELOPE */ + if (has_baseline && has_link) /* with edges */ + draw_clip_polygon(2*k+2, nodes); + else /* without edges */ + draw_clip_polygon(2*k, nodes+1); + } + + /* Resetting construction of polygon */ + k = 0; + } + } + } + + free(fillarea); + free(nodes); + free(gap); + free(state); +} + +#undef HSTEPS_POINT_VALID +#undef HSTEPS_POINT_NAN +#undef HSTEPS_POINT_UNDEFINED +#undef HSTEPS_GAP_POINT +#undef HSTEPS_GAP_COLOR +#undef interpolate_xl +#undef interpolate_xr +#undef extrapolate_xl +#undef extrapolate_xr + /* plot_bars: * Plot the curves in ERRORBARS style * we just plot the bars; the points are plotted in plot_points diff --git a/src/graphics.h b/src/graphics.h index f81bb6c9f..a611c4355 100644 --- a/src/graphics.h +++ b/src/graphics.h @@ -78,6 +78,7 @@ typedef struct curve_points { double smooth_parameter; /* e.g. optional bandwidth for smooth kdensity */ double smooth_period; /* e.g. 2pi for a circular function */ int boxplot_factors; /* Only used if plot_style == BOXPLOT */ + hsteps_opts hsteps_options; int p_max; /* how many points are allocated */ int p_count; /* count of points in points */ AXIS_INDEX x_axis; /* FIRST_X_AXIS or SECOND_X_AXIS */ @@ -132,4 +133,10 @@ void place_pixmaps(int layer, int dimensions); int filter_boxplot(struct curve_points *); void attach_title_to_plot(struct curve_points *this_plot, legend_key *key); +/* Only used in hsteps style */ + +#define HSTEPS_DIR_BOTHSIDES 0 +#define HSTEPS_DIR_FORWARD 1 +#define HSTEPS_DIR_BACKWARD 2 + #endif /* GNUPLOT_GRAPHICS_H */ diff --git a/src/misc.c b/src/misc.c index 22abb4c54..816f4d314 100644 --- a/src/misc.c +++ b/src/misc.c @@ -1768,3 +1768,101 @@ pixmap_from_colormap(t_pixmap *pixmap) pixmap->ncols = 1; pixmap->nrows = size; } + + +/* + * Parse hsteps/steps/fsteps/histeps/fillsteps plot options + */ + +void +parse_hsteps (enum PLOT_STYLE plot_style, hsteps_opts *hso, filledcurves_opts *fco) +{ + *fco = (filledcurves_opts) EMPTY_FILLEDCURVES_OPTS; + *hso = (hsteps_opts) DEFAULT_HSTEPS_OPTS; + + /* Setting options for steps/fsteps/histeps/fillsteps emulation */ + if (plot_style == STEPS) { + hso->direction = HSTEPS_DIR_FORWARD; + hso->baseline = FALSE; + return; + } else if (plot_style == FSTEPS) { + hso->direction = HSTEPS_DIR_BACKWARD; + hso->baseline = FALSE; + return; + } else if (plot_style == HISTEPS) { + return; + } else if (plot_style == FILLSTEPS) { + hso->direction = HSTEPS_DIR_FORWARD; + hso->baseline = FALSE; + get_filledcurves_style_options(fco); + return; + } + + /* Setting options for hsteps */ + + while (TRUE) { + + get_filledcurves_style_options(fco); + + /* direction */ + if (almost_equals(c_token, "fo$rward")) { + c_token++; + hso->direction = HSTEPS_DIR_FORWARD; + continue; + } + + if (almost_equals(c_token, "ba$ckward")) { + c_token++; + hso->direction = HSTEPS_DIR_BACKWARD; + continue; + } + + /* connecting lines */ + if (almost_equals(c_token, "base$line")) { + c_token++; + hso->baseline = TRUE; + hso->link = TRUE; + hso->split = FALSE; + continue; + } + + if (almost_equals(c_token, "pillar$s")) { + c_token++; + hso->baseline = TRUE; + hso->link = TRUE; + hso->split = TRUE; + continue; + } + + if (equals(c_token, "link")) { + c_token++; + hso->baseline = FALSE; + hso->link = TRUE; + hso->split = FALSE; + continue; + } + + if (equals(c_token, "nolink")) { + c_token++; + hso->baseline = FALSE; + hso->link = FALSE; + hso->split = FALSE; + continue; + } + + /* offset */ + if (equals(c_token, "offset")) { + c_token++; + hso->offset = real_expression(); + continue; + } + + break; + } + + /* The 'link/nolink' should ignore the 'above/below' and 'y=' */ + if (!hso->baseline) + *fco = (filledcurves_opts) EMPTY_FILLEDCURVES_OPTS; + + return; +} diff --git a/src/misc.h b/src/misc.h index 00de0667d..93084a6af 100644 --- a/src/misc.h +++ b/src/misc.h @@ -85,6 +85,8 @@ void get_image_options(t_image *image); int parse_dashtype(struct t_dashtype *dt); +void parse_hsteps (enum PLOT_STYLE plot_style, hsteps_opts *hso, filledcurves_opts *fco); + /* State information for load_file(), to recover from errors * and properly handle recursive load_file calls */ diff --git a/src/plot.c b/src/plot.c index 6dd3ce0f2..99dc89869 100644 --- a/src/plot.c +++ b/src/plot.c @@ -746,6 +746,10 @@ init_session() /* Undefine any previously-used variables */ del_udv_by_name("",TRUE); + /* Clear any previous customization of linetypes */ + while (first_perm_linestyle != NULL) + delete_linestyle(&first_perm_linestyle, NULL, first_perm_linestyle); + /* Restore default colors before loading local preferences */ set_colorsequence(1); diff --git a/src/plot2d.c b/src/plot2d.c index 2e742469c..2cef63b9d 100644 --- a/src/plot2d.c +++ b/src/plot2d.c @@ -534,9 +534,13 @@ get_data(struct curve_points *current_plot) break; case BOXES: + case HSTEPS: + /* 1 column: y coordinate only */ + /* 2 columns: x and y coordinates */ + /* 3 columns: x and y coordinates and width */ + /* extra columns allow variable colors */ min_cols = 1; max_cols = 4; - break; case FILLEDCURVES: @@ -546,6 +550,8 @@ get_data(struct curve_points *current_plot) break; case IMPULSES: /* 2 + possible variable color */ + case HISTEPS: + case FILLSTEPS: case POLYGONS: case LINES: case DOTS: @@ -555,9 +561,9 @@ get_data(struct curve_points *current_plot) case LABELPOINTS: /* 3 column data: X Y Label */ - /* extra columns allow variable pointsize, pointtype, and/or rotation */ + /* extra columns allow variable rotation, pointsize, pointtype, textcolor */ min_cols = 3; - max_cols = 6; + max_cols = 7; expect_string( 3 ); break; @@ -1112,6 +1118,35 @@ get_data(struct curve_points *current_plot) break; } + case HSTEPS: + { + /* 2 columns: x y + * 3 columns: x y width + */ + coordval xlow = v[0]; + coordval xhigh = v[0]; + coordval ylow = v[1] + current_plot->hsteps_options.offset; + coordval yhigh = v[1] + current_plot->hsteps_options.offset; + coordval width = -1.0; + if (j == 2) { + /* We cannot calculate xlow/xhigh yet since they + * depend on both adjacent segments. + */ + } else if ( j == 3 && v[2] >= 0 ) { + /* Setting: direction */ + int hsteps_type = current_plot->hsteps_options.direction; + double anchor = ( hsteps_type == HSTEPS_DIR_FORWARD ) ? 0 : + ( hsteps_type == HSTEPS_DIR_BACKWARD ) ? 1 : + 0.5; + width = v[2]; + xlow = v[0] - anchor*width; + xhigh = v[0] + (1.0-anchor)*width; + } + store2d_point(current_plot, i++, v[0], v[1], + xlow, xhigh, ylow, yhigh, width); + break; + } + case FILLEDCURVES: { /* 2 columns: x y * 3 columns: x y1 y2 @@ -1466,9 +1501,10 @@ store2d_point( double radius = (xhigh - xlow)/2.0; xlow = x - radius; xhigh = x + radius; - - } - else if (current_plot->plot_style == SECTORS) { + } else if (current_plot->plot_style == POINTSTYLE + || current_plot->plot_style == LABELPOINTS + || current_plot->plot_style == LINESPOINTS + || current_plot->plot_style == SECTORS) { ; } else { /* Jan 2017 - now skipping range check on rhigh, rlow */ @@ -2670,8 +2706,7 @@ eval_plots() int_error(c_token, "\"with\" allowed only after parametric function fully specified"); this_plot->plot_style = get_style(); - if (this_plot->plot_style == FILLEDCURVES - || this_plot->plot_style == FILLSTEPS) { + if (this_plot->plot_style == FILLEDCURVES) { /* read a possible option for 'with filledcurves' */ get_filledcurves_style_options(&this_plot->filledcurves_options); if ((this_plot->plot_filter == FILTER_CONVEX_HULL) @@ -2679,6 +2714,14 @@ eval_plots() this_plot->filledcurves_options.closeto = FILLEDCURVES_CLOSED; } + if (this_plot->plot_style == HSTEPS + || this_plot->plot_style == STEPS + || this_plot->plot_style == FSTEPS + || this_plot->plot_style == FILLSTEPS + || this_plot->plot_style == HISTEPS) + parse_hsteps(this_plot->plot_style, &(this_plot->hsteps_options), + &(this_plot->filledcurves_options)); + if (this_plot->plot_style == IMAGE || this_plot->plot_style == RGBIMAGE || this_plot->plot_style == RGBA_IMAGE) { @@ -2870,9 +2913,10 @@ eval_plots() if (equals(c_token,"fs") || almost_equals(c_token,"fill$style")) { if (this_plot->plot_style == SPIDERPLOT) this_plot->fill_properties = spiderplot_style.fillstyle; - else + else { this_plot->fill_properties = default_fillstyle; - this_plot->fill_properties.fillpattern = pattern_num; + this_plot->fill_properties.fillpattern = pattern_num; + } parse_fillstyle(&this_plot->fill_properties); set_fillstyle = TRUE; } @@ -2896,6 +2940,18 @@ eval_plots() } /* while (!END_OF_COMMAND) */ + /* This allows substitution of HSTEPS for older step modes that + * were set by default with "set style {data|func}" + */ + if (!set_with) { + if (this_plot->plot_style == STEPS + || this_plot->plot_style == FSTEPS + || this_plot->plot_style == FILLSTEPS + || this_plot->plot_style == HISTEPS) + parse_hsteps(this_plot->plot_style, &(this_plot->hsteps_options), + &(this_plot->filledcurves_options)); + } + if (duplication) int_error(c_token, "duplicated or contradicting arguments in plot options"); @@ -3018,9 +3074,10 @@ eval_plots() if (!set_fillstyle) { if (this_plot->plot_style == SPIDERPLOT) this_plot->fill_properties = spiderplot_style.fillstyle; - else + else { this_plot->fill_properties = default_fillstyle; - this_plot->fill_properties.fillpattern = pattern_num; + this_plot->fill_properties.fillpattern = pattern_num; + } parse_fillstyle(&this_plot->fill_properties); } if ((this_plot->fill_properties.fillstyle == FS_PATTERN) diff --git a/src/save.c b/src/save.c index f833b3749..9991c7aa9 100644 --- a/src/save.c +++ b/src/save.c @@ -1979,9 +1979,9 @@ save_contourfill(FILE *fp) if (contourfill.mode == CFILL_AUTO) fprintf(fp, "auto %d\n", contourfill.nslices); else if (contourfill.mode == CFILL_ZTICS) - fprintf(fp, "ztics level %d\n", contourfill.tic_level); + fprintf(fp, "ztics\n"); else if (contourfill.mode == CFILL_CBTICS) - fprintf(fp, "cbtics level %d\n", contourfill.tic_level); + fprintf(fp, "cbtics\n"); if (contourfill.firstlinetype > 0) fprintf(fp, "set contourfill firstlinetype %d\n", contourfill.firstlinetype); else diff --git a/src/set.c b/src/set.c index b680c787d..a3a86abfb 100644 --- a/src/set.c +++ b/src/set.c @@ -1441,20 +1441,10 @@ set_contourfill(void) } else if (equals(c_token, "ztics")) { c_token++; contourfill.mode = CFILL_ZTICS; - contourfill.tic_level = 0; - if (equals(c_token, "level")) { - c_token++; - contourfill.tic_level = int_expression(); - } } else if (equals(c_token, "cbtics")) { c_token++; contourfill.mode = CFILL_CBTICS; - contourfill.tic_level = 0; - if (equals(c_token, "level")) { - c_token++; - contourfill.tic_level = int_expression(); - } } else if (almost_equals(c_token, "pal$ette")) { c_token++; diff --git a/src/tables.c b/src/tables.c index 92f79b2ab..4298213cd 100644 --- a/src/tables.c +++ b/src/tables.c @@ -651,7 +651,7 @@ struct gen_table default_color_names_tbl[] = { "sienna4" , 128*(1<<16) + 64*(1<<8) + 20 }, { "orchid4" , 128*(1<<16) + 64*(1<<8) + 128 }, { "mediumpurple3" , 128*(1<<16) + 96*(1<<8) + 192 }, - { "slateblue1" , 128*(1<<16) + 96*(1<<8) + 255 }, + { "slateblue" , 128*(1<<16) + 96*(1<<8) + 255 }, { "yellow4" , 128*(1<<16) + 128*(1<<8) + 0 }, { "sienna1" , 255*(1<<16) + 128*(1<<8) + 64 }, { "tan1" , 255*(1<<16) + 160*(1<<8) + 64 }, @@ -741,6 +741,7 @@ const struct gen_table plotstyle_tbl[] = { "fillst$eps", FILLSTEPS }, { "fs$teps", FSTEPS }, { "his$teps", HISTEPS }, + { "hs$teps", HSTEPS }, { "vec$tors", VECTOR }, { "arrow$s", ARROWS }, { "fin$ancebars", FINANCEBARS }, diff --git a/src/wxterminal/gp_cairo.c b/src/wxterminal/gp_cairo.c index 2347ac7f9..1f9bd772a 100644 --- a/src/wxterminal/gp_cairo.c +++ b/src/wxterminal/gp_cairo.c @@ -401,6 +401,9 @@ void gp_cairo_draw_polygon(plot_struct *plot, int n, gpiPoint *corners) /* begin by stroking any open path */ gp_cairo_stroke(plot); + if (n <= 0) + return; + if (plot->polygons_saturate) { int i; path_item *path; diff --git a/term/cairo.trm b/term/cairo.trm index 5cd07d32d..04cbee37e 100644 --- a/term/cairo.trm +++ b/term/cairo.trm @@ -1357,17 +1357,20 @@ void cairotrm_set_color(t_colorspec *colorspec) /* here we send the polygon command */ void cairotrm_filled_polygon(int n, gpiPoint *corners) { - gpiPoint *mirrored_corners = (gpiPoint*) gp_alloc(n*sizeof(gpiPoint),"mirrored_corners"); + gpiPoint *corners_copy; + + if (n <= 0) + return; + /* can't use memcpy() here, as we have to mirror the y axis */ - gpiPoint *corners_copy = mirrored_corners; - while (corners_copy < (mirrored_corners + n)) { - *corners_copy = *corners++; - corners_copy->y = term->ymax - corners_copy->y; - ++corners_copy; + corners_copy = gp_alloc(n*sizeof(gpiPoint),"mirrored_corners"); + for (int i=0; i < n; i++) { + corners_copy[i] = corners[i]; + corners_copy[i].y = term->ymax - corners_copy[i].y; } - gp_cairo_draw_polygon(&plot, n, mirrored_corners); - free(mirrored_corners); + gp_cairo_draw_polygon(&plot, n, corners_copy); + free(corners_copy); } void cairotrm_image(unsigned int M, unsigned int N, coordval * image, gpiPoint * corner, t_imagecolor color_mode) diff --git a/term/context.trm b/term/context.trm index 9318649e3..76e3f7e0a 100644 --- a/term/context.trm +++ b/term/context.trm @@ -1610,6 +1610,7 @@ CONTEXT_write_palette(t_sm_palette *palette) break; /* interpolated table: explicitly defined or read from file */ case SMPAL_COLOR_MODE_GRADIENT: + case SMPAL_COLOR_MODE_VIRIDIS: fprintf(gpoutfile, "color_mode(gradient);"); CONTEXT_write_palette_gradient(palette->gradient, palette->gradient_num); break; diff --git a/term/post.trm b/term/post.trm index 7abb87eec..e7186befd 100644 --- a/term/post.trm +++ b/term/post.trm @@ -3138,6 +3138,7 @@ PS_make_header(t_sm_palette *palette) break; } case SMPAL_COLOR_MODE_GRADIENT: + case SMPAL_COLOR_MODE_VIRIDIS: fputs("/InterpolatedColor true def\n", gppsfile); make_interpolation_code(); write_gradient_definition(palette->gradient, palette->gradient_num); @@ -3460,7 +3461,7 @@ write_png_image_to_buffer(unsigned M, unsigned N, coordval *image, t_imagecolor { gdImagePtr png_img; int m, n, pixel; - if (color_mode == IC_RGB) { + if (color_mode == IC_RGB || color_mode == IC_RGBA) { png_img = gdImageCreateTrueColor(M, N); } else { /* we would need a gray scale image, but libgd does not support @@ -3472,7 +3473,7 @@ write_png_image_to_buffer(unsigned M, unsigned N, coordval *image, t_imagecolor int_error(NO_CARET, "GNUPLOT (post.trm): failed to create libgd image structure"); } - if (color_mode == IC_RGB) { + if (color_mode == IC_RGB || color_mode == IC_RGBA) { rgb_color rgb1; rgb255_color rgb255; for (n = 0; n < N; n++) { @@ -3483,6 +3484,9 @@ write_png_image_to_buffer(unsigned M, unsigned N, coordval *image, t_imagecolor rgb255_from_rgb1(rgb1, &rgb255); pixel = gdImageColorResolve(png_img, (int)rgb255.r, (int)rgb255.g, (int)rgb255.b); gdImageSetPixel(png_img, m, n, pixel); + if (color_mode == IC_RGBA) { + image++; /* ignore alpha channel */ + } } } } else { @@ -3567,7 +3571,7 @@ write_png_image_to_buffer(unsigned M, unsigned N, coordval *image, t_imagecolor int m, n; - if (color_mode == IC_RGB) { + if (color_mode == IC_RGB || color_mode == IC_RGBA) { format = CAIRO_FORMAT_RGB24; } else { format = CAIRO_FORMAT_A8; @@ -3575,7 +3579,7 @@ write_png_image_to_buffer(unsigned M, unsigned N, coordval *image, t_imagecolor stride = cairo_format_stride_for_width(format, M); image255 = (unsigned char *) gp_alloc(N * stride, "Postscript image bytes"); - if (color_mode == IC_RGB) { + if (color_mode == IC_RGB || color_mode == IC_RGBA) { /* Adapted from gp_cairo_helpers.c (use unsigned int to respect endianess of the platform). */ rgb_color rgb1; rgb255_color rgb255; @@ -3588,6 +3592,9 @@ write_png_image_to_buffer(unsigned M, unsigned N, coordval *image, t_imagecolor rgb1.b = *image++; rgb255_from_rgb1(rgb1, &rgb255); *image255_ptr++ = (0xFF<<24) + (rgb255.r<<16) + (rgb255.g<<8) + rgb255.b; + if (color_mode == IC_RGBA) { + image++; /* ignore alpha channel */ + } } } } else { @@ -3734,14 +3741,22 @@ PS_encode_image(unsigned int M, unsigned int N, coordval *image, t_imagecolor co unsigned char tuple5[5]; int max_encoded_bytes; char *encoded_image, *encoded_image_ptr; + unsigned ncomponents; unsigned long total_bits; + int current_channel; #define ASCII_PER_LINE 78 /* 18.1.2009 RGB images ("plot ... with rgbimage") are drawn always in color, * i.e. for both "set term post color" and "set term post mono". */ - total_bits = bits_per_component*M*N*((color_mode == IC_RGB /* && ps_params->color */) ? 3 : 1); + if (color_mode == IC_RGB) + ncomponents = 3; + else if (color_mode == IC_RGBA) /* alpha channel will be ignored */ + ncomponents = 3; + else + ncomponents = 1; + total_bits = bits_per_component * ncomponents * M * N; /* At the end of each image line, data is aligned to the nearest 8 bits, * which means potentially adding 7 bits per line. @@ -3770,24 +3785,30 @@ PS_encode_image(unsigned int M, unsigned int N, coordval *image, t_imagecolor co i_line = ASCII_PER_LINE; i_element = 0; coord_remaining = M*N; - if (color_mode == IC_RGB /* && ps_params->color */) { + if (color_mode == IC_RGB) { + end_of_line *= 3; + coord_remaining *= 3; + } + if (color_mode == IC_RGBA) { end_of_line *= 3; coord_remaining *= 3; } bits_remaining = 32; bits_start = 0; tuple4 = 0; + current_channel = 0; while (coord_remaining) { - unsigned short us_tmp; - if (0 /* color_mode == IC_RGB && !ps_params->color */) { - coordval c_tmp; - c_tmp = *coord_ptr++; - c_tmp += *coord_ptr++; - c_tmp += *coord_ptr++; - us_tmp = (unsigned short) (c_tmp*(max_colors-1)/3.0 + 0.5); - } else - us_tmp = (unsigned short) ((*coord_ptr++) * max_colors); + unsigned short us_tmp = (*coord_ptr++) * max_colors; + + /* Ignore alpha channel */ + if (color_mode == IC_RGBA) { + current_channel++; + if (current_channel == 4) { + current_channel = 0; + continue; + } + } if (us_tmp > (max_colors-1)) us_tmp = max_colors-1; @@ -3916,15 +3937,18 @@ print_five_operand_image(unsigned int M, unsigned int N, gpiPoint *corner, t_ima fprintf(gppsfile, "%s[ %d 0 0 %d 0 0 ]\n", space, M, N); if (ps_params->level1) { fprintf(gppsfile, "/imagebuf %d string def\n", - (M*N*bits_per_component*((color_mode == IC_RGB /* && ps_params->color */) ? 3 : 1) + 7)/8); + (M*N*bits_per_component*((color_mode == IC_RGB || color_mode == IC_RGBA) ? 3 : 1) + 7)/8); fputs("{currentfile imagebuf readhexstring pop}\n", gppsfile); } else if (ps_params->level3) { fprintf(gppsfile, " currentfile /ASCII85Decode filter << /Predictor 15 /BitsPerComponent %d /Colors %d /Columns %d >> /FlateDecode filter\n", - bits_per_component, (color_mode == IC_RGB) ? 3 : 1, M); + bits_per_component, (color_mode == IC_RGB || color_mode == IC_RGBA) ? 3 : 1, M); } else { fprintf(gppsfile, " currentfile /ASCII85Decode filter\n"); } - if (color_mode == IC_RGB /* && ps_params->color */) { + if (color_mode == IC_RGB) { + fprintf(gppsfile, "%sfalse 3\n" + "%scolorimage\n", space, space); + } else if (color_mode == IC_RGBA) { fprintf(gppsfile, "%sfalse 3\n" "%scolorimage\n", space, space); } else @@ -3977,14 +4001,10 @@ PS_image (unsigned int M, unsigned int N, coordval *image, gpiPoint *corner, t_i /* Color and gray scale images do not need a palette and can use * the 5 operand form of the image routine. */ -#if 0 - /* 18.1.2009 It was decided to use the custom palette (i.e. colours) also - for the monochrome postscript output. - */ - if ((color_mode == IC_RGB) || (sm_palette.colorMode == SMPAL_COLOR_MODE_GRAY) || !ps_params->color) -#else - if ((color_mode == IC_RGB) || (sm_palette.colorMode == SMPAL_COLOR_MODE_RGB && !ps_params->color) || (sm_palette.colorMode == SMPAL_COLOR_MODE_GRAY)) -#endif + if ((color_mode == IC_RGB) + || (color_mode == IC_RGBA) + || (sm_palette.colorMode == SMPAL_COLOR_MODE_RGB && !ps_params->color) + || (sm_palette.colorMode == SMPAL_COLOR_MODE_GRAY)) five_operand_image = TRUE; else five_operand_image = FALSE; @@ -4000,15 +4020,17 @@ PS_image (unsigned int M, unsigned int N, coordval *image, gpiPoint *corner, t_i cscale = 1.0; #ifdef HAVE_DEFLATE_ENCODER - if (ps_params->level3) + if (ps_params->level3) { encoded_image = (void *)PS_encode_png_image(M, N, image, color_mode, bits_per_component, max_colors, cscale, &num_encoded_bytes); - else + } else { #endif encoded_image = PS_encode_image(M, N, image, color_mode, bits_per_component, max_colors, cscale, - (ps_params->level1 ? PS_ASCII_HEX : PS_ASCII85), &num_encoded_bytes); + (ps_params->level1 ? PS_ASCII_HEX : PS_ASCII85), + &num_encoded_bytes); + } fputs("%%%%BeginImage\n", gppsfile); @@ -4083,7 +4105,7 @@ PS_image (unsigned int M, unsigned int N, coordval *image, gpiPoint *corner, t_i } else if (ps_params->level3) { fprintf(gppsfile, " /DataSource currentfile /ASCII85Decode filter "); fprintf(gppsfile, "<< /Predictor 15 /BitsPerComponent %d /Colors %d /Columns %d >> /FlateDecode filter\n", - bits_per_component, (color_mode == IC_RGB) ? 3 : 1, M); + bits_per_component, (color_mode == IC_RGB || color_mode == IC_RGBA) ? 3 : 1, M); } else { fputs(" /DataSource currentfile /ASCII85Decode filter\n", gppsfile); } diff --git a/term/svg.trm b/term/svg.trm index fac73ce6c..7816d51cf 100644 --- a/term/svg.trm +++ b/term/svg.trm @@ -132,6 +132,8 @@ static unsigned char SVG_green = 0; static unsigned char SVG_blue = 0; static double SVG_alpha = 0.0; static unsigned char SVG_color_mode = TC_DEFAULT; +static unsigned int SVG_rgb = 0; +static unsigned int SVG_patterncolor[8]; static char *SVG_linecolor = NULL; static char *SVG_name = NULL; static char *SVG_scriptdir = NULL; @@ -436,10 +438,18 @@ SVG_DefineFillPattern(int fillpat) { char *path; char *style="stroke"; + unsigned int newcolor; fillpat %= 8; - if (fillpat != SVG_fillPattern) { + + if (SVG_color_mode == TC_RGB || SVG_color_mode == TC_LT) + newcolor = SVG_rgb; + else + newcolor = SVG_patterncolor[fillpat]; + + if (fillpat != SVG_fillPattern || newcolor != SVG_patterncolor[fillpat]) { SVG_fillPattern = fillpat; + SVG_patterncolor[fillpat] = newcolor; SVG_PathClose(); SVG_fillPatternIndex++; @@ -478,12 +488,11 @@ SVG_DefineFillPattern(int fillpat) if (*path) { char *figure = "fill:none;"; if (!strcmp(style,"fill")) figure = "stroke:none;"; - if (SVG_color_mode == TC_RGB) + if (SVG_color_mode == TC_RGB || SVG_color_mode == TC_LT) fprintf(gpoutfile,"\t\t\t\n", - figure, style, SVG_red, SVG_green, SVG_blue, path); - else if (SVG_color_mode == TC_LT) - fprintf(gpoutfile, "\t\t\t\n", - figure, style, SVG_linecolor, path); + figure, style, + (newcolor >> 16) & 0xff, (newcolor >> 8) & 0xff, newcolor & 0xff, + path); else fprintf(gpoutfile, "\t\t\t\n", figure, style, path); @@ -830,6 +839,9 @@ SVG_init () SVG_LineType = LT_NODRAW; + for (int i=0; i<8; i++) + SVG_patterncolor[i] = 0xff000000; + /* set xmax, ymax*/ term->xmax = SVG_xSize; @@ -1690,6 +1702,7 @@ SVG_set_color(t_colorspec *colorspec) { rgb255_color rgb255; SVG_alpha = 0.0; + SVG_rgb = rgb_from_colorspec(colorspec); if (colorspec->type == TC_LT) { if (SVG_linecolor != SVG_pens[SVG_Pen_RealID (colorspec->lt)].color) {